Bump github.com/contribsys/faktory from 1.6.0 to 1.6.1 (#27)

Bumps [github.com/contribsys/faktory](https://github.com/contribsys/faktory) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/contribsys/faktory/releases)
- [Changelog](https://github.com/contribsys/faktory/blob/main/Changes.md)
- [Commits](https://github.com/contribsys/faktory/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/contribsys/faktory
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2022-07-18 10:07:49 -07:00 committed by GitHub
parent 8b9a9cb7f4
commit c1d1f734e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 32 deletions

4
go.mod
View File

@ -4,7 +4,7 @@ go 1.18
require (
github.com/cactus/go-statsd-client/v5 v5.0.0
github.com/contribsys/faktory v1.6.0
github.com/contribsys/faktory v1.6.1
github.com/contribsys/faktory_worker_go v1.6.0
github.com/go-fed/activity v1.0.0
github.com/go-fed/httpsig v1.1.0
@ -75,7 +75,7 @@ require (
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/uint128 v1.1.1 // indirect
modernc.org/cc/v3 v3.35.26 // indirect
modernc.org/ccgo/v3 v3.16.2 // indirect

10
go.sum
View File

@ -52,8 +52,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/contribsys/faktory v1.6.0 h1:tgJji4TDX8I8/BL1OZNf0Ik748lh0cARgUyhKMxWi64=
github.com/contribsys/faktory v1.6.0/go.mod h1:i0je6v+dcCoAVdPZZaW8nQIHTj3az4ZOwBXegJK39aA=
github.com/contribsys/faktory v1.6.1 h1:c+v9WSxkh1kpfmc5ZTuKifzkqMokWTWg8DvWlelXf5s=
github.com/contribsys/faktory v1.6.1/go.mod h1:R8+inlM1rq3GzyG8iZUL7qhfNfXGIgcbQRvTHmSyuUI=
github.com/contribsys/faktory_worker_go v1.6.0 h1:ov69BLHL62i/wRLJwvuj5UphwgjMOINRCGW3KzrKOjk=
github.com/contribsys/faktory_worker_go v1.6.0/go.mod h1:XMNGn3sBJdqFGfTH4SkmYkMovhdkq5cDJj36wowfbNY=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
@ -339,8 +339,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
@ -725,8 +725,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@ -47,7 +47,6 @@ type Batch struct {
// b.Jobs(func() error {
// b.Push(...)
// })
// b.Commit()
//
func NewBatch(cl *Client) *Batch {
return &Batch{
@ -69,7 +68,7 @@ func (b *Batch) Jobs(fn func() error) error {
}
}
if b.faktory == nil || b.committed {
return BatchNotOpen
return ErrBatchNotOpen
}
if err := fn(); err != nil {
@ -81,10 +80,10 @@ func (b *Batch) Jobs(fn func() error) error {
func (b *Batch) Push(job *Job) error {
if b.new {
return BatchNotOpen
return ErrBatchNotOpen
}
if b.faktory == nil || b.committed {
return BatchAlreadyCommitted
return ErrBatchAlreadyCommitted
}
job.SetCustom("bid", b.Bid)
return b.faktory.Push(job)
@ -95,10 +94,10 @@ func (b *Batch) Push(job *Job) error {
// You must use client.BatchOpen to get a new copy if you want to commit more jobs.
func (b *Batch) Commit() error {
if b.new {
return BatchNotOpen
return ErrBatchNotOpen
}
if b.faktory == nil || b.committed {
return BatchAlreadyCommitted
return ErrBatchAlreadyCommitted
}
if err := b.faktory.BatchCommit(b.Bid); err != nil {
return fmt.Errorf("cannot commit %q batch: %w", b.Bid, err)
@ -111,8 +110,8 @@ func (b *Batch) Commit() error {
}
var (
BatchAlreadyCommitted = fmt.Errorf("Batch has already been committed, must reopen")
BatchNotOpen = fmt.Errorf("Batch must be opened before it can be used")
ErrBatchAlreadyCommitted = fmt.Errorf("batch has already been committed, must reopen")
ErrBatchNotOpen = fmt.Errorf("batch must be opened before it can be used")
)
/////////////////////////////////////////////

View File

@ -252,7 +252,7 @@ func dial(srv *Server, password string, dialer Dialer) (*Client, error) {
}
} else {
conn.Close()
return nil, fmt.Errorf("Expecting HI but got: %s", line)
return nil, fmt.Errorf("expecting HI but got: %s", line)
}
data, err := json.Marshal(client)
@ -280,7 +280,7 @@ func (c *Client) Close() error {
}
func (c *Client) Ack(jid string) error {
err := c.writeLine(c.wtr, "ACK", []byte(fmt.Sprintf(`{"jid":"%s"}`, jid)))
err := c.writeLine(c.wtr, "ACK", []byte(fmt.Sprintf(`{"jid":%q}`, jid)))
if err != nil {
return err
}
@ -442,19 +442,19 @@ func (c *Client) QueueSizes() (map[string]uint64, error) {
faktory, ok := hash["faktory"].(map[string]interface{})
if !ok {
return nil, fmt.Errorf("Invalid info hash: %s", hash)
return nil, fmt.Errorf("invalid info hash: %s", hash)
}
queues, ok := faktory["queues"].(map[string]interface{})
if !ok {
return nil, fmt.Errorf("Invalid info hash: %s", hash)
return nil, fmt.Errorf("invalid info hash: %s", hash)
}
sizes := make(map[string]uint64)
for name, size := range queues {
size, ok := size.(float64)
if !ok {
return nil, fmt.Errorf("Invalid queue size: %v", size)
return nil, fmt.Errorf("invalid queue size: %v", size)
}
sizes[name] = uint64(size)
@ -569,19 +569,19 @@ func emptyClientData() *ClientData {
}
func writeLine(wtr *bufio.Writer, op string, payload []byte) error {
//util.Debugf("> %s %s", op, string(payload))
// util.Debugf("> %s %s", op, string(payload))
_, err := wtr.Write([]byte(op))
_, err := wtr.WriteString(op)
if payload != nil {
if err == nil {
_, err = wtr.Write([]byte(" "))
_, err = wtr.WriteString(" ")
}
if err == nil {
_, err = wtr.Write(payload)
}
}
if err == nil {
_, err = wtr.Write([]byte("\r\n"))
_, err = wtr.WriteString("\r\n")
}
if err == nil {
err = wtr.Flush()
@ -598,7 +598,7 @@ func ok(rdr *bufio.Reader) error {
return nil
}
return fmt.Errorf("Invalid response: %s", string(val))
return fmt.Errorf("invalid response: %s", string(val))
}
func readString(rdr *bufio.Reader) (string, error) {
@ -655,13 +655,13 @@ func readResponse(rdr *bufio.Reader) ([]byte, error) {
if err != nil {
return nil, err
}
//util.Debugf("< %s%s", string(chr), string(line))
//util.Debugf("< %s", string(buff))
// util.Debugf("< %s%s", string(chr), string(line))
// util.Debugf("< %s", string(buff))
return buff, nil
case '-':
return nil, &ProtocolError{msg: string(line)}
default:
//util.Debugf("< %s%s", string(chr), string(line))
// util.Debugf("< %s%s", string(chr), string(line))
return line, nil
}
}

View File

@ -2,5 +2,5 @@ package client
var (
Name = "Faktory"
Version = "1.6.0"
Version = "1.6.1"
)

11
vendor/gopkg.in/yaml.v3/parserc.go generated vendored
View File

@ -687,6 +687,9 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i
func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {
if first {
token := peek_token(parser)
if token == nil {
return false
}
parser.marks = append(parser.marks, token.start_mark)
skip_token(parser)
}
@ -786,7 +789,7 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) {
}
token := peek_token(parser)
if token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN {
if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN {
return
}
@ -813,6 +816,9 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) {
func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {
if first {
token := peek_token(parser)
if token == nil {
return false
}
parser.marks = append(parser.marks, token.start_mark)
skip_token(parser)
}
@ -922,6 +928,9 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev
func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {
if first {
token := peek_token(parser)
if token == nil {
return false
}
parser.marks = append(parser.marks, token.start_mark)
skip_token(parser)
}

4
vendor/modules.txt vendored
View File

@ -1,7 +1,7 @@
# github.com/cactus/go-statsd-client/v5 v5.0.0
## explicit; go 1.11
github.com/cactus/go-statsd-client/v5/statsd
# github.com/contribsys/faktory v1.6.0
# github.com/contribsys/faktory v1.6.1
## explicit; go 1.17
github.com/contribsys/faktory/client
github.com/contribsys/faktory/internal/pool
@ -492,7 +492,7 @@ gopkg.in/ini.v1
# gopkg.in/yaml.v2 v2.4.0
## explicit; go 1.15
gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.0
# gopkg.in/yaml.v3 v3.0.1
## explicit
gopkg.in/yaml.v3
# lukechampine.com/uint128 v1.1.1