nex-arq-worker-pattern
Production-ready ARQ background workers for FastAPI with Redis heartbeats, cron jobs, and hardened systemd units.
- Offload long-running AI or data tasks to a non-blocking background queue
- Schedule recurring Python functions using cron-style syntax without Linux crontabs
- Monitor worker health via a JSON API endpoint using Redis heartbeats
$9
· or 45 creditsSecure checkout via Stripe
Included in download
- Offload long-running AI or data tasks to a non-blocking background queue
- Schedule recurring Python functions using cron-style syntax without Linux crontabs
- terminal, network, env_vars automation included
Sample input
Add a background job system to my FastAPI app. I need a daily 2 AM cleanup task and a way to check if the worker is running from an API endpoint.
Sample output
I've generated the `arq-worker/` directory. - Added `WorkerSettings` with a cron job scheduled for 02:00. - Created `/api/infra/status` route to monitor `nex:worker:heartbeat`. - Generated `{{APP_NAME}}-worker.service` with strict system hardening. Run `sudo systemctl enable --now` to start.
nex-arq-worker-pattern
Production-ready ARQ background workers for FastAPI with Redis heartbeats, cron jobs, and hardened systemd units.
$9
· or 45 creditsSecure checkout via Stripe
Included in download
- Offload long-running AI or data tasks to a non-blocking background queue
- Schedule recurring Python functions using cron-style syntax without Linux crontabs
- terminal, network, env_vars automation included
- Instant install
Sample input
Add a background job system to my FastAPI app. I need a daily 2 AM cleanup task and a way to check if the worker is running from an API endpoint.
Sample output
I've generated the `arq-worker/` directory. - Added `WorkerSettings` with a cron job scheduled for 02:00. - Created `/api/infra/status` route to monitor `nex:worker:heartbeat`. - Generated `{{APP_NAME}}-worker.service` with strict system hardening. Run `sudo systemctl enable --now` to start.
About This Skill
Robust Background Processing for FastAPI
The Nex ARQ Worker Pattern provides a production-grade, asynchronous background job system designed specifically for FastAPI applications running on resource-constrained environments like Raspberry Pi or dedicated Linux VPS instances. It eliminates the complexity of Celery while providing more reliability than standard FastAPI BackgroundTasks by using a Redis-backed queue that survives application restarts.
What it does
- Generates a complete ARQ worker configuration with heartbeats and health monitoring.
- Provides a thread-safe, cached Redis pool for non-blocking job enqueuing from your API.
- Implements a persistent heartbeat system that allows your API to report worker health status.
- Configures hardened systemd service units for non-root execution and process reliability.
- Includes boilerplate for scheduled cron-style tasks (e.g., daily cleanups or data syncs).
Why use this skill
Standard Python job runners are often either too heavy (Celery) or too volatile (in-memory queues). This skill implements the "Nex Pattern": a battle-tested approach for multi-tenant SaaS apps that requires minimal memory, provides high visibility into worker health, and secures the process using Linux system hardening best practices. It ensures your background jobs are observable, restartable, and secure by default.
Use Cases
- Offload long-running AI or data tasks to a non-blocking background queue
- Schedule recurring Python functions using cron-style syntax without Linux crontabs
- Monitor worker health via a JSON API endpoint using Redis heartbeats
- Deploy workers as hardened, non-root systemd services for production security
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/nex-arq-worker-pattern -o /tmp/nex-arq-worker-pattern.zip && unzip -o /tmp/nex-arq-worker-pattern.zip -d ~/.claude/skills && rm /tmp/nex-arq-worker-pattern.zipFree skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Allowed Hosts
File Scopes