-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Task cancelation from middlewares or dependencies. #133
Comments
I created a PR #128, which can be described as a non-blocking sleep. |
Actually, i believe in their case it will be better to implement broker with custom |
@Sobes76rus Maybe. But what would listen be doing in that case? I guess, it's not a broker-related thing, because it's an application logic. Because for some tasks, you may don't want to have rate limiting. |
We can listen multiple queues in broker |
I mean, in that case rate-limited tasks should be in different queue |
I guess it's overcomplicated. Because, what if you need to have different limits for 50 different tasks? You need to listen to 50 different queues then? In my opinion this problem might be solved in a more simple way, by giving you ability to cancel task execution from middleware or dependency. And send it again in the queue. You can get access to broker message in context, and you can kick directly with broker. After the task is sent, you may cancel current, so it's not going to be written in result backend. |
Then it should be related to Retry not to Cancel |
Good point. Yes. Maybe we need to do it with state manager, then. |
I would like to have a feature like |
Like in Celery |
I guess now you can use #137 to simulate this behavior. The only thing we need to add is to set custom task-id to kicker. |
We need to provide more control over task execution.
Currently we need to add Cancel error, to be able to implement scenario, described in #132.
The text was updated successfully, but these errors were encountered: