Closed wlandau closed 1 year ago
Patch coverage: 100.00
% and no project coverage change
Comparison is base (
f6a5769
) 100.00% compared to head (8cff4e8
) 100.00%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Tests look good on Unix-like systems, but Windows GitHub Actions runners may have stalled. Not sure why.
I think I'll merge now and then figure out what to do about Windows later.
Tests look good on Unix-like systems, but Windows GitHub Actions runners may have stalled. Not sure why.
Sometimes on GH tests try to terminate before all background processes exit causing a hang. Just need a suitable sleep towards the end of your tests most likely. Not so common on Winbuilder - but you will need to test there to be sure.
How long of a Sys.sleep() has worked for you?
I am using 3L - but only because I use ephemeral mirai in my tests (non-daemon) and they require 2s to shut down. So I am guessing 1L should be enough in your case.
The 2s is to guard against the R session being reaped faster than the underlying C code can finish sending say a very large object (e.g. GBs). It can happen! But that only applies to the short-lived mirai which exit after each task, not daemons which run continuously.
I have noticed your use of 'transient' workers by setting max_tasks = 1L
. I have added the appropriate 2s guard in mirai in f80e4e6 for those processes exiting due to task/time outs, otherwise the daemon can exit before it can send back it's results. So yes, for tests Sys.sleep(3L)
would probably be a good idea.
Thanks for the tip! Hopefully https://github.com/wlandau/crew/commit/fa924fd5a4f926ce14ba368c8f5548608da2a3cf does the trick.
Prework
Related GitHub issues and pull requests
Summary
This PR rewrites
crew
usingmirai
as the underlying task scheduler. @shikokuchuo, thanks to your hard work onmirai
andnanonext
,crew
looks much more promising. I really appreciate all the time you spent helping me and implementing new features.Because of the one-port-per-worker requirement of the active queue, I still intend to write an alternative backend using
rrq
/Redis as the task scheduler. Either one will eventually win out over the other, or we can keep both and let users decide which one to run. An all-angles approach seems constructive at the moment.