arq icon indicating copy to clipboard operation
arq copied to clipboard

Support abort for deferred tasks

Open antoine-collet opened this issue 2 years ago • 1 comments

There is an issue when aborting a deferred task.

Currently when you abort a deferred task, the worker will wait until the deferred time is met to properly perform the delete.

This behaviour make it complicated to perform test that implicate canceling a deferred task.

I implemented a way to update the score of the deferred task when aborting it, but may be there is a better way to do this.

antoine-collet avatar May 08 '22 07:05 antoine-collet

Codecov Report

Merging #307 (764c5e8) into main (3d50f61) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #307   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files          11       11           
  Lines        1001     1007    +6     
  Branches      183      185    +2     
=======================================
+ Hits          990      996    +6     
  Misses          6        6           
  Partials        5        5           
Impacted Files Coverage Δ
arq/jobs.py 98.00% <100.00%> (+0.08%) :arrow_up:

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 3d50f61...764c5e8. Read the comment docs.

codecov[bot] avatar May 08 '22 07:05 codecov[bot]

No update in a while, so closing this.

Happy to re-open or review another PR if anyone wants to work on this.

samuelcolvin avatar Aug 30 '22 10:08 samuelcolvin

Hello @samuelcolvin ; @antoine-collet is on vacation til end of the week. He'll recontact you next week on this.

nsteinmetz avatar Aug 30 '22 11:08 nsteinmetz

ok, I'll defer the next release until next week.

samuelcolvin avatar Aug 30 '22 11:08 samuelcolvin

Hello @samuelcolvin,

Could you please reopen the PR so I can make the fixes you requested ?

Thank you

antoine-collet avatar Sep 02 '22 20:09 antoine-collet

@antoine-collet , you can still push changes to your branch and it’ll update here. 😊

JonasKs avatar Sep 02 '22 20:09 JonasKs

done.

samuelcolvin avatar Sep 02 '22 21:09 samuelcolvin

you'll need to rebase or merge with main for all tests to run.

samuelcolvin avatar Sep 02 '22 21:09 samuelcolvin

Everything seems fine from my side. Do you need any other modification to merge this PR ?

antoine-collet avatar Sep 05 '22 09:09 antoine-collet

great, thanks so much. I'll do the next release soon.

samuelcolvin avatar Sep 05 '22 09:09 samuelcolvin