mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #456] [FEATURE REQUEST] Is there any way to do some specific action before periodic task enqueue? #2235
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#2235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ChihSeanHsu on GitHub (May 8, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/456
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
As title, I'm wondering is there any option or handler before periodic task enqueue?
Describe the solution you'd like
Maybe, we can solve this case just like error-handling
Additional context
IMO, we can implement this function in Enqueue part, not only for periodic task.
@hibiken commented on GitHub (May 9, 2022):
@ChihSeanHsu thank you for creating a feature request.
What kind of action do you need to perform before enqueueing a task? I want to understand the motivation.
@ChihSeanHsu commented on GitHub (May 9, 2022):
@hibiken Thanks for your prompt response.
We want to have a metrics to monitor the periodic enqueue count or some other actions (Currently, I have no another idea).
Although, we can just make this metrics by processing task part, but I just wonder is there any pre-action way not post-action.
@hibiken commented on GitHub (May 10, 2022):
I see. Actually, now that I'm thinking about it, maybe it makes sense to allow users to provide callbacks before and after enqueue happens on Scheduler.
Something like:
@ChihSeanHsu commented on GitHub (May 10, 2022):
@hibiken Great.
Thanks for your help!
What will the road map be about this small feature?
Or can I just submit a PR about it?
@hibiken commented on GitHub (May 10, 2022):
@ChihSeanHsu Feel free to open a PR if you have bandwidth to work on it. Thanks :)
@ChihSeanHsu commented on GitHub (May 22, 2022):
Hi @hibiken
Here is the PR, and feel free to review it thanks.
@hibiken commented on GitHub (May 27, 2022):
Closed via #476. This feature will be included in the next release. Thank you @ChihSeanHsu !