mrc-ide / rrq

:runner::runner::runner: Lightweight Redis queues
https://mrc-ide.github.io/rrq/
Other
24 stars 4 forks source link

Consistent, nonrecursive, dependency handling #92

Closed richfitz closed 1 year ago

richfitz commented 1 year ago

This PR tidies up how we do dependency handling, ahead of refactoring to use lua scripts for most of it. In particular, there are no mutually recursive calls any more, with the only bit of recursion being the dependency finding.

This was much more fiddly to write than the line count suggests, and has at least one visible change in behaviour - cancelling a task no longer deletes it (this was a very odd choice, not sure why we'd have wanted that)

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 98.86% and project coverage change: -0.06 :warning:

Comparison is base (ccc5679) 99.94% compared to head (e3e0a86) 99.89%.

:exclamation: Current head e3e0a86 differs from pull request most recent head 9c7add8. Consider uploading reports for the commit 9c7add8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #92 +/- ## ========================================== - Coverage 99.94% 99.89% -0.06% ========================================== Files 28 28 Lines 1960 1973 +13 ========================================== + Hits 1959 1971 +12 - Misses 1 2 +1 ``` | [Impacted Files](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide) | Coverage Δ | | |---|---|---| | [R/dependencies.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9kZXBlbmRlbmNpZXMuUg==) | `100.00% <ø> (ø)` | | | [R/utils.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui91dGlscy5S) | `98.93% <50.00%> (-1.07%)` | :arrow_down: | | [R/heartbeat.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9oZWFydGJlYXQuUg==) | `100.00% <100.00%> (ø)` | | | [R/rrq\_controller.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9ycnFfY29udHJvbGxlci5S) | `99.84% <100.00%> (+<0.01%)` | :arrow_up: | | [R/task\_cleanup.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui90YXNrX2NsZWFudXAuUg==) | `100.00% <100.00%> (ø)` | | | [R/worker\_run.R](https://codecov.io/gh/mrc-ide/rrq/pull/92?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui93b3JrZXJfcnVuLlI=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.