{"id":21981670,"url":"https://github.com/soft/process-queue","last_synced_at":"2025-04-30T05:06:08.968Z","repository":{"id":46720810,"uuid":"82081626","full_name":"Soft/process-queue","owner":"Soft","description":"Command-line task queue","archived":false,"fork":false,"pushed_at":"2021-09-28T15:19:30.000Z","size":61,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T05:06:01.093Z","etag":null,"topics":["command-line","process-manager","queue","rust","server","task-queue","utility","work-queue"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T16:31:30.000Z","updated_at":"2024-12-13T07:06:26.000Z","dependencies_parsed_at":"2022-09-05T14:00:34.224Z","dependency_job_id":null,"html_url":"https://github.com/Soft/process-queue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fprocess-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fprocess-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fprocess-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soft%2Fprocess-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soft","download_url":"https://codeload.github.com/Soft/process-queue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644842,"owners_count":21620634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","process-manager","queue","rust","server","task-queue","utility","work-queue"],"created_at":"2024-11-29T17:19:05.259Z","updated_at":"2025-04-30T05:06:08.946Z","avatar_url":"https://github.com/Soft.png","language":"Rust","readme":"# process-queue 🚌\n\n[![Build status](https://github.com/Soft/process-queue/actions/workflows/ci.yml/badge.svg)](https://github.com/Soft/process-queue/actions)\n[![Latest Version](https://img.shields.io/crates/v/process-queue.svg)](https://crates.io/crates/process-queue)\n[![GitHub release](https://img.shields.io/github/release/Soft/process-queue.svg)](https://github.com/Soft/process-queue/releases)\n[![dependency status](https://deps.rs/repo/github/soft/process-queue/status.svg)](https://deps.rs/repo/github/soft/process-queue)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n`pqueue` is a command-line task queue.\n\nMultiple queues can be created and each queue can have its own configuration.\n\n## Installation\n\nStatically linked release binaries are available on [GitHub\nreleases](https://github.com/Soft/process-queue/releases). These should work on\nany modern x86-64 Linux system.\n\nAlternatively, `pqueue` can be installed using `cargo`:\n\n```\ncargo install process-queue\n```\n\n## Getting Started\n\nAll of the following examples assume that `pqueue` server has been first started\nwith\n\n```\npqueue start\n```\n\nThis starts `pqueue` server in the background. If desired, `--foreground` (`-f`)\nflag can be specified to keep the server attached to the terminal.\n\nThe simplest possible way to use `pqueue` is to create the default queue using\nthe default settings:\n\n```\npqueue create\n```\n\nThis creates a default task queue that sequentially executes each submitted\ntask. We can submit tasks for execution using `send` sub-command:\n\n```\npqueue send echo \"hello world\"\npqueue send true\npqueue send sleep 60\npqueue send curl example.com\n```\n\nThis queued four tasks for execution starting with `echo`. List of the pending\ntasks in a queue can be inspected using `tasks` sub-command.\n\nMultiple queues can be created by supplying queue name using the `--name` (`-n`)\noption when creating the queue. If no name is given `pqueue` sub-commands\nimplicitly operate on a queue named `default`.\n\n`pqueue` can be used for queueing time consuming tasks for execution. For\nexample, we might use `pqueue` for queueing file downloads. The following will\ncreate a task queue that sequentially executes `wget` with each queued URL as an\nargument.\n\n```\npqueue create -n downloads -t \"wget {}\"\npqueue send -n downloads example.com\npqueue send -n downloads example.org\n```\n\nThis create a new task queue named `downloads` with a task template that species\nthat each new task sent to the queue should be interpreted as an argument to\n`wget`.\n\nSee `Task Templates` section for more information regarding queue templates.\n\nBy default, `pqueue` executes each task sequentially. This can be changed by\nspecifying `--max-parallel` (`-p`) option when creating the task queue. For\nexample, the following command can be used create a queue that executes up to\nthree tasks in parallel.\n\n```\npqueue create -n sleepers -p 3 -t \"sleep {}\"\npqueue send -n sleepers 60\npqueue send -n sleepers 120\npqueue send -n sleepers 180\npqueue send -n sleepers 240\n```\n\nThis will create a queue named `sleepers` for invoking `sleep` command with\ndifferent arguments. Four tasks are submitted to the queue, three of which will\nbegin executing immediately while the fourth task remains in the queue until\nfree execution slots become available.\n\n## Usage\n\n### `pqueue`\n\n```\nTask queue\n\nUSAGE:\n    pqueue [OPTIONS] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -s, --socket \u003csocket\u003e    Server socket path\n\nSUBCOMMANDS:\n    start-server    Start queue server [aliases: start]\n    stop-server     Stop queue server [aliases: stop]\n    create-queue    Create new task queue [aliases: create]\n    remove-queue    Remove task queue [aliases: remove]\n    list-queues     List queues [aliases: queues]\n    send-task       Send task to a queue [aliases: send]\n    list-tasks      List tasks in a queue [aliases: tasks]\n    help            Prints this message or the help of the given subcommand(s)\n```\n\n### `pqueue start-server`\n\n```\nStart queue server\n\nUSAGE:\n    pqueue start-server [FLAGS] [OPTIONS]\n\nFLAGS:\n    -f, --foreground    Keep pqueue server in the foreground\n    -h, --help          Prints help information\n    -v                  Log level\n    -V, --version       Prints version information\n\nOPTIONS:\n    -l, --log-file \u003clog-file\u003e    Log file\n```\n\n### `pqueue stop-server`\n\n```\nStop queue server\n\nUSAGE:\n    pqueue stop-server\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n```\n\n### `pqueue create-queue`\n\n```\nCreate new task queue\n\nUSAGE:\n    pqueue create-queue [FLAGS] [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -s, --stdout     Output to stdin\n    -V, --version    Prints version information\n\nOPTIONS:\n    -d, --dir \u003cdir\u003e                      Default working directory\n    -f, --file \u003cfile\u003e                    Output to file\n    -p, --max-parallel \u003cmax-parallel\u003e    Maximum number of parallel tasks [default: 1]\n    -n, --name \u003cname\u003e                    Queue name [default: default]\n    -t, --template \u003ctemplate\u003e            Task template\n    -T, --timeout \u003ctimeout\u003e              Default task timeout\n```\n\n### `pqueue remove-queue`\n\n```\nRemove task queue\n\nUSAGE:\n    pqueue remove-queue [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -n, --name \u003cname\u003e    Queue name [default: default]\n```\n\n### `pqueue list-queues`\n\n```\nList queues\n\nUSAGE:\n    pqueue list-queues\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n```\n\n### `pqueue send-task`\n\n```\nSend task to a queue\n\nUSAGE:\n    pqueue send-task [OPTIONS] [args]...\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -d, --dir \u003cdir\u003e            Working directory\n    -n, --name \u003cname\u003e          Task name [default: default]\n    -T, --timeout \u003ctimeout\u003e    Task timeout\n\nARGS:\n    \u003cargs\u003e...\n```\n\n### `pqueue list-tasks`\n\n```\nList tasks in a queue\n\nUSAGE:\n    pqueue list-tasks [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -n, --name \u003cname\u003e    Task name [default: default]\n```\n\n## Task Templates\n\nBy default queues can execute arbitrary commands. It is however possible to make\nspecialized task queues that have a task template associated with them. When a\nnew task is sent to a queue that has a task template associated with it, the\ntemplate is expanded using the arguments supplied to `send-task`. When a queue\nis created, a task template can be specified using the `--template` option.\n\nTask templates specify the command that will be executed. The template can\ncontain zero or more `{}` placeholders that will be replaced with the arguments\nsupplied to `send-task`.\n\nTemplates can also contain at most one `{...}` placeholder. This placeholders\naccepts variable number of arguments.\n\n## Issues\n\nBugs should be reported at [GitHub](https://github.com/Soft/process-queue/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoft%2Fprocess-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoft%2Fprocess-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoft%2Fprocess-queue/lists"}