2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-09-20 02:55:54 +08:00

Minor cleanup

This commit is contained in:
Ken Hibino 2019-12-30 07:10:13 -08:00
parent 22b21df884
commit ade97befbc
2 changed files with 2 additions and 5 deletions

View File

@ -37,14 +37,11 @@ type Background struct {
// Config specifies the background-task processing behavior.
type Config struct {
// Max number of concurrent workers to process tasks.
// Maximum number of concurrent workers to process tasks.
//
// If set to zero or negative value, NewBackground will overwrite the value to one.
Concurrency int
// TODO(hibiken): Add ShutdownTimeout
// ShutdownTimeout time.Duration
// Function to calculate retry delay for a failed task.
//
// By default, it uses exponential backoff algorithm to calculate the delay.

View File

@ -70,7 +70,7 @@ func (p *processor) stop() {
func (p *processor) terminate() {
p.stop()
// TODO(hibiken): Allow user to customize this timeout value.
// IDEA: Allow user to customize this timeout value.
const timeout = 8 * time.Second
time.AfterFunc(timeout, func() { close(p.quit) })
log.Println("[INFO] Waiting for all workers to finish...")