-
-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preHandler and postHandler for Scheduler #476
Add preHandler and postHandler for Scheduler #476
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for creating this PR! Could you also add an entry in CHANGELOG.md under "Unreleased"
scheduler.go
Outdated
location *time.Location | ||
done chan struct{} | ||
wg sync.WaitGroup | ||
preHandler func(task *Task, opts []Option) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit): rename this to preEnqueueFunc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified.
scheduler.go
Outdated
done chan struct{} | ||
wg sync.WaitGroup | ||
preHandler func(task *Task, opts []Option) | ||
postHandler func(info *TaskInfo, err error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit): rename this to postEnqueueFunc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified.
Thanks for your remind. I've added it into CHANGELOG.md. |
Codecov Report
@@ Coverage Diff @@
## master #476 +/- ##
==========================================
+ Coverage 68.28% 68.34% +0.06%
==========================================
Files 27 27
Lines 3821 3829 +8
==========================================
+ Hits 2609 2617 +8
Misses 928 928
Partials 284 284
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
As discussion here