Skip to content

Run an extra command whenever the queue is empty #578

@fzyzcjy

Description

@fzyzcjy

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.

parameters.insert("id", task.id.to_string());
add a line here, giving state.tasks.len().

Explain your usecase of the requested feature

(see above)

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions