mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-10 11:31:58 +08:00
Remove error log from Scheduler
This commit is contained in:
parent
6c954c87bf
commit
d0209d9273
@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
- `PreEnqueueFunc`, `PostEnqueueFunc` is added in `Scheduler` and deprecated `EnqueueErrorHandler` (PR: https://github.com/hibiken/asynq/pull/476)
|
- `PreEnqueueFunc`, `PostEnqueueFunc` is added in `Scheduler` and deprecated `EnqueueErrorHandler` (PR: https://github.com/hibiken/asynq/pull/476)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Removed error log when `Scheduler` failed to enqueue a task. Use `PostEnqueueFunc` to check for errors and task actions if needed.
|
||||||
|
- Changed log level from ERROR to WARNINING when `Scheduler` failed to record `SchedulerEnqueueEvent`.
|
||||||
|
|
||||||
## [0.23.0] - 2022-04-11
|
## [0.23.0] - 2022-04-11
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -147,7 +147,6 @@ func (j *enqueueJob) Run() {
|
|||||||
j.postEnqueueFunc(info, err)
|
j.postEnqueueFunc(info, err)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
j.logger.Errorf("scheduler could not enqueue a task %+v: %v", j.task, err)
|
|
||||||
if j.errHandler != nil {
|
if j.errHandler != nil {
|
||||||
j.errHandler(j.task, j.opts, err)
|
j.errHandler(j.task, j.opts, err)
|
||||||
}
|
}
|
||||||
@ -160,7 +159,7 @@ func (j *enqueueJob) Run() {
|
|||||||
}
|
}
|
||||||
err = j.rdb.RecordSchedulerEnqueueEvent(j.id.String(), event)
|
err = j.rdb.RecordSchedulerEnqueueEvent(j.id.String(), event)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
j.logger.Errorf("scheduler could not record enqueue event of enqueued task %+v: %v", j.task, err)
|
j.logger.Warnf("scheduler could not record enqueue event of enqueued task %s: %v", info.ID, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user