Skip to content

pueue restart stashed jobs #660

@alexheretic

Description

@alexheretic

A detailed description of the feature you would like to see added.

pueue restart doesn't currently work with stashed tasks: Couldn't restart tasks: [0].

It could be made to with behaviour, say for stashed task 33:

  • pueue restart 33 => 33 is enqueued at the back of the work queue. 33 is removed. Equivalent to re-adding an identical task and removing 33.
  • pueue restart -s 33 => 33 is stashed at the back of the work queue. 33 is removed.
  • pueue restart -i 33 => 33 is enqueued in place. Same behaviour as enqueue.

The behaviour seems fairly consistent to existing behavour.

Explain your usecase of the requested feature

When managing tasks I may have a bunch of stashed ones followed by later ones I started. I sometimes want earlier stashed tasks to run after later already queued ones. In general it is a bit of a pain currently to reorder tasks with switch.

With the proposed behaviour I could use pueue restart to enqueue stashed task(s) to run after everything else I already queued, or to move stashed task(s) to the back while keeping them stashed.

Alternatives

Using switch... please don't make me.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    s: ClientThis issue touches the pueue clients: DaemonThis issue touches pueue daemons: Pueue-libThis issue touches the pueue-lib libraryt: Discussiont: FeatureA new feature that needs implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions