https://github.com/marcuwynu23/onqueue
Onqueue is a lightweight, multithreaded task queue runner built in Rust using Axum. It supports REST API and CLI-based task management, making it ideal for automating shell commands, deployment tasks, and lightweight job queues.
https://github.com/marcuwynu23/onqueue
cmdline command deployment management queue queueing shared task terminal vps
Last synced: 14 days ago
JSON representation
Onqueue is a lightweight, multithreaded task queue runner built in Rust using Axum. It supports REST API and CLI-based task management, making it ideal for automating shell commands, deployment tasks, and lightweight job queues.
- Host: GitHub
- URL: https://github.com/marcuwynu23/onqueue
- Owner: marcuwynu23
- Created: 2025-04-07T08:34:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-25T04:51:46.000Z (6 months ago)
- Last Synced: 2025-04-25T05:34:04.238Z (6 months ago)
- Topics: cmdline, command, deployment, management, queue, queueing, shared, task, terminal, vps
- Language: Rust
- Homepage: https://crates.io/crates/onqueue
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Onqueue
![]()
![]()
![]()
![]()
**Onqueue** is a lightweight, multithreaded task queue runner built in Rust using [Axum](https://github.com/tokio-rs/axum). It supports REST API and CLI-based task management, making it ideal for automating shell commands, deployment tasks, and lightweight job queues.
---
## ๐ฆ Features
- โ Queue tasks with names and commands
- โ Web server using Axum with endpoints to add/list tasks
- โ CLI support: `onqueue add`, `onqueue list`
- โ Multithreaded task runner with retry support
- โ Persistent queue file via `queue.yml`
- โ JSON API output
- โ Automatic retries on failure
- โ Configurable apps via `queue-app.yml`---
## ๐งฐ Usage
### โถ๏ธ Running the Server
```bash
onqueue serve
```Server starts on [http://localhost:8080](http://localhost:8080)
---
### ๐ API Endpoints
- **GET /** โ Show welcome message
- **GET /list** โ Return current tasks as JSON
- **GET /add?name=app1&cmd=echo+Hello** โ Queue a new task---
### ๐ฅ๏ธ CLI Usage
#### Add from `queue-app.yml`
```yaml
# queue-app.yml
name: deploy
command: ansible-playbook deploy.yml
``````bash
onqueue add .
```#### List tasks
```bash
onqueue list
```---
## ๐ Directory Structure
```
.
โโโ src/
โโโ queue.yml # Stores all queued tasks
โโโ queue-app.yml # CLI-based task configuration
โโโ logs/ # (planned) Directory for task execution logs
โโโ Cargo.toml
โโโ README.md
```---
## ๐ Example
```bash
curl "http://localhost:8080/add?name=build&cmd=echo+Building"
curl "http://localhost:8080/list"
```Output:
```json
[
{
"name": "build",
"command": "echo Building",
"status": "completed",
"start_time": "2025-04-07T10:00:00Z",
"end_time": "2025-04-07T10:00:01Z",
"retries": 0
}
]
```---
## ๐ฃ Roadmap
See [FEATURE-TODO-LIST.md](./FEATURE-TODO-LIST.md) for upcoming improvements:
- Logging
- CLI formatting
- Cron-like scheduling
- Persistent task results
- PM2 integration---
## ๐งช Development
Install dependencies:
```bash
cargo install --path .
```Run in dev mode:
```bash
cargo run
```---
## โ๏ธ License
MIT ยฉ [Your Name or Org]