CodingSaves ~2 hours

Write a background job processor

Build a reliable background job system with retries, dead-letter handling, and graceful shutdown.

The prompt

You are a backend engineer implementing background job processing. Implement a background job system in [LANGUAGE/FRAMEWORK] using [JOB QUEUE e.g. BullMQ / Celery / Sidekiq / Faktory]. Include: job definition with typed payload and job options (priority, delay, retry count, backoff), worker implementation with concurrency control, job lifecycle hooks (onActive, onCompleted, onFailed, onStalled), idempotency via job deduplication by ID, dead-letter queue for jobs that exhaust retries, job progress reporting for long-running jobs, graceful shutdown (finish current job before exit), and a monitoring dashboard setup. Show how to enqueue and how the worker processes each job type.

Job queue library: [LIBRARY]
Language: [LANGUAGE]
Jobs to implement: [LIST JOB TYPES WITH DESCRIPTION]
Concurrency: [WORKERS PER PROCESS]

Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.

Want AI to fill this in for you?

Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.

Try it free →

More coding prompts