Pueue

From Leo's Notes
Last edited on 3 January 2023, at 19:05.

Pueue is a command line task manager which queues processes for sequential or parallel execution.

Project website: https://github.com/nukesor/pueue

Installation[edit | edit source]

Download the pueue and pueued binaries from their project website on GitHub. Run pueued -d to start the daemon. The first time you run the pueue daemon will also generate the pueue config at ~/.config/pueue/pueue.yml.

Usage[edit | edit source]

The pueue command will print out its usage in good detail, but here's a quick cheat sheet covering only the very basics.

Action Command
Show queue status pueue status
Enqueue a job

The command can be a inline script (in single quotes)

pueue add command
Follow a job's output, defaults to stdout.

use -e for stderr

pueue follow job-id

pueue follow -e job-id

Stop a running job pueue kill job-id
Remove a queued job pueue remove job-id
Show jobs pueue log
Parallelize with 2 jobs pueue parallel 2
Removed finish tasks and clear log pueue clean

Troubleshooting[edit | edit source]

Failed to initialize client[edit | edit source]

After running pueued as a systemd service, pueue fails with the following message:

# pueue
Error: Failed to initialize client.

Caused by:
    0: Failed to initialize stream.
    1: I/O error at path "/run/user/0/pueue_root.socket" while connecting to daemon. Did you start it?:
       No such file or directory (os error 2)

To fix this, just edit the pueue configuration file and define the location of the socket.

  1. Edit $HOME/.config/pueue/pueue.yml
  2. Under the 'shared' key, define something like: unix_socket_path: /root/.local/share/pueue/pueue_root.socket