Skip to content
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

Merged

Conversation

ChihSeanHsu
Copy link
Contributor

As discussion here

Copy link
Owner

@hibiken hibiken left a 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)
Copy link
Owner

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

Copy link
Contributor Author

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)
Copy link
Owner

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified.

@ChihSeanHsu
Copy link
Contributor Author

Thank you for creating this PR! Could you also add an entry in CHANGELOG.md under "Unreleased"

Thanks for your remind. I've added it into CHANGELOG.md.

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #476 (5a046c2) into master (30d4093) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            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              
Impacted Files Coverage Δ
scheduler.go 82.85% <100.00%> (+1.03%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@hibiken hibiken merged commit e0e5d1a into hibiken:master May 27, 2022
@ChihSeanHsu ChihSeanHsu deleted the feat/scheduler_pre_post_enqueue_func branch May 28, 2022 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants