-
Notifications
You must be signed in to change notification settings - Fork 136
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
Run an extra command whenever the queue is empty #578
Comments
(The content in the root post is edited for more details) |
I see how that can be useful. How about, we add a simple boolean to the template variables. Something like The |
You could then do stuff like if [[ "true" = "{{ group_finished }}" ]]; then
if [[ "default" = "{{ group }}" ]]; then
# Do your stuff
fi
fi |
Thanks, that looks pretty reasonable! |
One more question. When should a queue be considered finished?
|
Hmm, then maybe provide fine-grained details, such as |
A detailed description of the feature you would like to see added.
Hi thanks for the tool! My (summarized) use case is like this: Submit a few deep learning jobs to my workstation, and when all are done (i.e. GPU is finally idle), send me a Slack message such that I can come and use the idle GPU. For example, I will need the idle GPU to tentatively run some new commands, debug them, and when they look good, submit it to the queue.
Thus, it would be great to have a feature that, when the job is empty, run an extra command to notify users.
EDIT: Looks like I can use the "Callback" feature to handle it. Seems need to query
pueue
to know whether the queue is empty now, thus it would be great if this information could be provided as a variable.EDIT: Looks like it can be done by e.g.
pueue/pueue/src/daemon/callbacks.rs
Line 62 in 9a402d5
state.tasks.len()
.Explain your usecase of the requested feature
(see above)
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: