Documentation
FastQ v1.0.0 reference guide
Installation
Binary (recommended)
# Linux x86_64
$ curl -fsSL https://github.com/OxoGhost01/FastQ/releases/latest/download/fastq-linux-x86_64.tar.gz | tar xz
$ sudo mv fastq /usr/local/bin/
# macOS ARM (Apple Silicon)
$ curl -fsSL https://github.com/OxoGhost01/FastQ/releases/latest/download/fastq-macos-arm64.tar.gz | tar xz
$ sudo mv fastq /usr/local/bin/
Build from source
Requirements: GCC or Clang, Make, hiredis, json-c, OpenSSL
$ git clone https://github.com/OxoGhost01/FastQ && cd FastQ
$ make && sudo make install
Python SDK
$ pip install fastq
Node.js SDK
$ npm install fastq-js
Quick Start
Make sure Redis is running, then:
# 1. Start a worker
$ fastq worker start --queue default --threads 4
→ Connected to Redis localhost:6379
→ Worker pool 4 threads
✓ Listening on queues [default]
# 2. In another terminal — push a job
$ fastq push myTask '{"msg":"hello"}'
✓ Job enqueued id=7f2a3c
Configuration
FastQ reads ~/.fastq/config.toml or the path set by FASTQ_CONFIG.
[redis]
url = "redis://localhost:6379"
pool = 16 # connection pool size
[worker]
threads = 8 # worker threads
queues = ["high", "normal", "low"]
[retry]
max_attempts = 3
backoff_base = 2 # seconds (exponential)
CLI — worker
fastq worker start [flags]
--queue <name,...> Queues to consume (default: default)
--threads <n> Worker thread count (default: CPU cores)
--config <path> Config file path
--daemon Run as background daemon
CLI — push
fastq push <job-name> <json-payload> [flags]
--priority <high|normal|low> (default: normal)
--queue <name> (default: default)
--delay <seconds> Delay before processing (Pro)
CLI — stats
fastq stats [--json]
Queue Pending Active Failed Throughput
high 3 8 0 12,400/s
normal 142 16 2 38,000/s
low 89 4 0 3,200/s
CLI — license
# Activate a license key
fastq license activate "email@example.com:67a8f3e1:a1b2c3d4e5f60718:3f4a8b2c1d6e9f0a7b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3b"
# Or save to file
echo "your-key" > ~/.fastq/license
# Check status
fastq license status
Python SDK
from fastq import FastQ, Worker
# Initialize
fq = FastQ("redis://localhost:6379")
# Push a job
fq.push("send_email", payload={"to": "user@example.com"}, priority="high")
# Push delayed (Pro)
fq.push("reminder", payload={}, delay=3600) # 1 hour
# Push cron (Pro)
fq.schedule("cleanup", cron="0 3 * * *")
# Define workers
worker = Worker(fq, queues=["high", "normal"], threads=8)
@worker.job("send_email")
def handle(job):
send_email(job.payload["to"])
job.complete()
worker.start()
Node.js SDK
const { FastQ, Worker } = require('fastq-js');
// Initialize
const fq = new FastQ('redis://localhost:6379');
// Push jobs
await fq.push('processOrder', { orderId: 42 }, { priority: 'high' });
// Worker
const worker = new Worker(fq, { queues: ['high', 'normal'], threads: 8 });
worker.on('processOrder', async (job) => {
await handleOrder(job.payload.orderId);
await job.complete();
});
worker.start();
Scheduling
PRO
# Delayed job (runs after 1 hour)
fastq push cleanup '{}' --delay 3600
# Cron job (every day at 03:00)
fastq schedule dailyCleanup --cron "0 3 * * *"
Rate Limiting
PRO
# In config.toml — limit to 100 jobs/sec per worker
[rate_limit]
enabled = true
rate = 100
burst = 20
DAG Workflows
PRO
from fastq import FastQ, Workflow
fq = FastQ("redis://localhost:6379")
dag = Workflow(fq)
# fetchData → processData → sendReport
dag.chain(["fetchData", "processData", "sendReport"])
dag.start()
License Activation
Step 1 — Get your machine ID (before purchasing)
Your license is machine-bound. Run this on the machine you want to activate, and copy the output:
$ head -c 16 /etc/machine-id
a1b2c3d4e5f60718
Step 2 — Purchase & receive your key
Paste your machine ID during checkout. After payment, a machine-bound license key is generated and emailed to you automatically.
Step 3 — Activate
$ fastq license activate "user@example.com:67a8f3e1:a1b2c3d4e5f60718:3f4a8b2c1d6e9f0a7b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3b"
✓ FastQ Pro activated — scheduling & rate-limiting unlocked
# Or save key file manually
$ echo "your-key" > ~/.fastq/license
Need to transfer to a new machine? Contact support@fastq.oxoghost.dev