diff --git a/context.go b/context.go index daf91e5..5e604a5 100644 --- a/context.go +++ b/context.go @@ -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 "" diff --git a/context_test.go b/context_test.go index 9ccfba3..d9e0ccb 100644 --- a/context_test.go +++ b/context_test.go @@ -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)