-
Notifications
You must be signed in to change notification settings - Fork 206
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
TimeLimitExceeded failures are not recorded to results table #367
Comments
can you check this PR #366 |
@auvipy I'll test the PR once it makes it into a release. |
@auvipy after testing with 2.5.0 I am still getting the same behavior, unfortunately. Flower says the task has failed with a However on the results page it still shows |
I suggest to dig deeper into the issue and find out the root cause |
@auvipy I tried looking through If it's the former, I'm thinking one of the following:
Any ideas here would be appreciated! |
I figured out that any invocations of the progress state update will cause the state of the task to get "stuck" within the results table: https://github.com/shipperstack/shipper/blob/master/core/tasks.py#L101-L107 I think that this is because paramiko (the SFTP library used within the task) is asynchronous, and when the timeout is reached the last call to the state update is made after the FAILURE result is recorded to the database. I guess I could have the callback check if the state is in FAILURE before updating, but am not sure if that won't have a race condition as well. Ideally it should not overwrite a SUCCESS/FAILURE status. |
@auvipy would it be possible to have I've tried alternatives, like not setting the |
problem is none of the celery packages support async await as of yet |
When a task fails for exceeding the specified time limit, the
FAILURE
state is not saved to the results table.I have to manually check the status of the task using a tool like flower to see if tasks have failed or not.
This may be related to issue #37, as I use
update_state()
to send back progress data to Django.Here is the relevant code snippet:
https://github.com/shipperstack/shipper/blob/master/core/tasks.py#L101-L103
The text was updated successfully, but these errors were encountered: