conventions

This commit is contained in:
Binaek Sarkar
2022-02-10 15:26:34 +05:30
committed by Ken Hibino
parent 55d0610a03
commit ebd7a32c0f
4 changed files with 14 additions and 21 deletions

View File

@@ -101,10 +101,7 @@ type Config struct {
//
// If BaseContext is nil, the default is context.Background().
// If this is defined, then it MUST return a non-nil context
BaseContext BaseCtxFn
// SleepOnEmptyQueue optionally specifies the amount of time to wait before polling again when there are no messages in the queue
SleepOnEmptyQueue time.Duration
BaseContext func() context.Context
// Function to calculate retry delay for a failed task.
//
@@ -212,9 +209,6 @@ func (fn ErrorHandlerFunc) HandleError(ctx context.Context, task *Task, err erro
fn(ctx, task, err)
}
// BaseCtxFn provides the root context from where the execution contexts of tasks are derived
type BaseCtxFn func() context.Context
// RetryDelayFunc calculates the retry delay duration for a failed task given
// the retry count, error, and the task.
//