mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #91] [FEATURE REQUEST] Create tasks without timestamp #26
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#26
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 @gunnsth on GitHub (Feb 18, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/91
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
Sometimes I don't really want to schedule a task. Just want it to get processed as soon as possible (next slot ready). It feels a bit awkward to need to provide a timestamp for that, even if time.Now() will work in most cases (assuming that the clocks are well synchronized - which normally would not be a problem).
Describe the solution you'd like
Would be nice if could do something like:
and the task would be processed in next available slot without any time dependence.
Describe alternatives you've considered
Using
time.Now()is currently the way to go. But as I mentioned, any time differences can lead to delay in processing. In many cases the goal is to have tasks processed right away, in which case any possible delays are not desirable.Additional context
Basically came from my feeling of using the library. I could be wrong here or not understand fully how the internals handle the timing. In that case, the documentation could be improved a bit to clarify.
@hibiken commented on GitHub (Feb 19, 2020):
Thanks for this feedback!
As described in Life of a Task, when you call
Task will be enqueued immediately to a queue (FIFO queue) and will be dequeued by a worker as soon as it gets to the front of the queue.
My initial thought behind exporting just one method from the
Clienttype was to keep the API surface area as small as possible.But, I completely agree that we can provide better API to do what's effectively done with
In fact, I've been thinking about changing this Client API for the last few weeks myself.
Here's my proposal for the
ClientAPIThis is similar to python's RQ library's API.
Let me know your thoughts.
@gunnsth commented on GitHub (Feb 19, 2020):
Yes that sounds great.
@hibiken commented on GitHub (Feb 19, 2020):
@gunnsth Would you like to work on this?
@gunnsth commented on GitHub (Feb 19, 2020):
@hibiken Sure. I can take a look at it. Need to familiarize myself a bit with the internals first and best ways for debugging. Should be fun. Might take a while though as I am pretty swamped at the moment.
@hibiken commented on GitHub (Feb 20, 2020):
No pressure! Feel free to ping me on gitter channel if you have questions 😄