mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #335] [QUESTION] How does registration and execution of task works with scheduler? #2170
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#2170
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 @sujit-baniya on GitHub (Oct 24, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/335
Originally assigned to: @hibiken on GitHub.
For a normal task, we need to create handler and assign queue to that handler (if we use mux). So whenever task is enqueued, handler processes the task.
But for scheduled task, as per this: https://github.com/hibiken/asynq/wiki/Periodic-Tasks
I don't see we define the handler for the task. So please help me understand, when I register a task
How is this task executed? Which handler executes this task?
@crossworth commented on GitHub (Oct 24, 2021):
Hello, the task handler for the task, when you use the scheduler you are "only chaning the way" the task get put on the queue.
See this comment for more info: https://github.com/hibiken/asynq/issues/308#issuecomment-893711883
@sujit-baniya commented on GitHub (Oct 24, 2021):
@crossworth So it means, I have to create queue (by default
defaultqueue is used) and handler for this queue on server. Start the scheduler then register the scheduled task to the queuerobfig/cron will pick the task and
Enqueueto the provided queue at that specific time period, right?If that's the case, then maybe need to update the wiki: https://github.com/hibiken/asynq/wiki/Periodic-Tasks with full example?
@crossworth commented on GitHub (Oct 24, 2021):
Yes, at least for the current implementation.