-
-
Notifications
You must be signed in to change notification settings - Fork 41
On-the-fly ProgressJob reconfiguration with swapjob!() #279
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
base: master
Are you sure you want to change the base?
Conversation
swapjob!() allows for hot-swapping jobs whilst the progress bar is running. This allows for flexible representation of task state and ease in updating ProgressJob readouts.
Need to stop writing the code straight into the markdown source and committing without running it :P.
* add `timeout-minutes` * fix `macos-latest`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #279 +/- ##
==========================================
+ Coverage 87.27% 88.10% +0.83%
==========================================
Files 48 48
Lines 2899 2925 +26
==========================================
+ Hits 2530 2577 +47
+ Misses 369 348 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Seems some issues with the integration testing:
Testing issues only, but getting it cleaned up. |
|
Just a heads-up that the pruning of the column vector in I have this fixed in the patch here, but consider it to be an interface bug and will raise a separate issue. |
|
Hi @FedeClaudi , @t-bltg, any motion on this? |

This PR adds an additional function,
swapjob!(), which is similar toaddjob!()for progress bars, but allows for alteration ofProgressJobobjects without displacing them from their location in the job list.This interface is capable of many things:
N) and unbounded (N == nothing) jobs,Nor the description, andThis is particularly useful when a set of jobs are moving through a state machine, with their best representation changing over time. An example of this might be a thread pool, where each worker in sequence is given URLs to download: we may want the task list to move from an unbounded "connecting" message, to a bounded progress bar with new columns indicating download progress, to "complete" and "idle" messages, as tasks are distributed.
(In fact, that's exactly my use case!)
I have updated the documentation and tests; the full series of commits is in this PR.
Note that this PR is independent of my other pending PR, but has been rebased on top of recent master.
A minimal example is here: