Skip to content
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

Add option for acknowledging failed tasks (globally and per-task) #298

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

Balletie
Copy link
Contributor

@Balletie Balletie commented Mar 9, 2018

If a task fails with an exception, it is retried until it succeeds. This is contrary to what is said in the documentation: under the "Architecture" section, heading "Broker" (link) it says that even when a task errors, it's still considered a successful delivery. Failed tasks never get acknowledged however, thereby being retried after the timeout period. See also issues #238 and #194.

This patch adds an option to acknowledge failures, thereby closing issue #238. Issue #194 would require some more work. The default of this option is set to False, thereby maintaining backwards
compatibility.

If a task fails with an exception, it is retried until it
succeeds. This is contrary to what is said in the documentation: under
the "Architecture" section, heading "Broker" it says that even when a
task errors, it's still considered a successful delivery. Failed tasks
never get acknowledged however, thereby being retried after the
timeout period. See also issues Koed00#238 and Koed00#194.

This patch adds an option to acknowledge failures, thereby closing
issue Koed00#238. Issue Koed00#194 would require some more work. The default of
this option is set to `False`, thereby maintaining backwards
compatibility.
@codecov-io
Copy link

codecov-io commented Mar 9, 2018

Codecov Report

Merging #298 into master will increase coverage by 0.1%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #298     +/-   ##
=========================================
+ Coverage    90.2%   90.31%   +0.1%     
=========================================
  Files          44       44             
  Lines        2839     2870     +31     
=========================================
+ Hits         2561     2592     +31     
  Misses        278      278
Impacted Files Coverage Δ
django_q/cluster.py 91.21% <100%> (+0.23%) ⬆️
django_q/tests/test_cluster.py 100% <100%> (ø) ⬆️
django_q/conf.py 71.42% <100%> (+0.25%) ⬆️
django_q/tasks.py 99.45% <66.66%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c657731...03abbc9. Read the comment docs.

@Koed00 Koed00 merged commit d5e430b into Koed00:master Mar 13, 2018
@Balletie
Copy link
Contributor Author

Balletie commented Mar 13, 2018

Thank you! Issue #238 can now be closed. And thank you for creating this package, I found it when looking for a more lightweight solution without a dependency on redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants