Skip to content

Commit

Permalink
Fixes bid key on jobHelper.Bid()
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoy authored and mperham committed Aug 17, 2020
1 parent 8426a78 commit c439c1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (h *jobHelper) Jid() string {
return h.job.Jid
}
func (h *jobHelper) Bid() string {
if b, ok := h.job.GetCustom("bid"); ok {
if b, ok := h.job.GetCustom("_bid"); ok {
return b.(string)
}
return ""
Expand Down
2 changes: 1 addition & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestBatchContext(t *testing.T) {

job := faktory.NewJob("something", 1, 2)
job.SetCustom("track", 1)
job.SetCustom("bid", "nosuchbatch")
job.SetCustom("_bid", "nosuchbatch")

ctx := jobContext(pool, job)
help := HelperFor(ctx)
Expand Down

0 comments on commit c439c1b

Please sign in to comment.