-
Notifications
You must be signed in to change notification settings - Fork 55
Create Unique Task Decorator #1
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
Comments
Thanks for the great suggestion - I totally missed the idea of making |
I created a wiki with some roadmap ideas, and I added this idea to that list. So closing this issue. |
Just did commit 59a5461 that adds |
The convention of declaring
task.unique(‘function_name’)
seems a bit non-pythonic.I feel like it might be better to create a
@unique
decorator that ensures that the method it wraps is only run once.Could even add a param that will control what that means:
@unique
or@unique(“restart”)
would kill the previous run@unique(“queue”)
would enqueue subsequent calls.I’m sure there are more cases, just spit-balling.
The text was updated successfully, but these errors were encountered: