▸case-01 I need a Python background worker function using Celery to call an external payment API. The payment API occasionally experiences transient 503 errors. A developer suggested catching RequestException and calling time.sleep(5) in a while loop until it succeeds. Write the Celery task code using built-in Celery retry capabilities instead. | pass→pass | 18,478 | 22,320 | +21% | 1 | 1 | 0% | 2,445 | 3,882 | +59% | 0 | 0 | — |
▸case-02 We have a Go background worker pool reading tasks from a channel. On server shutdown, the team currently executes os.Exit(0) as soon as SIGTERM is received, abandoning jobs in progress. Provide the Go worker pool shutdown implementation that handles OS signals properly without interrupting active workers. | pass→pass | 16,986 | 23,654 | +39% | 1 | 1 | 0% | 3,193 | 3,811 | +19% | 0 | 0 | — |
▸case-03 In a Node.js background worker executing heavy video processing jobs that take up to 10 minutes, jobs are frequently marked as stalled and re-run by a second worker mid-execution. A colleague suggested setting worker concurrency to 100 to fix it. Write the BullMQ worker configuration that correctly handles long-running jobs without duplicate execution. | pass→fail | 20,807 | 15,409 | -26% | 1 | 1 | 0% | 2,877 | 3,206 | +11% | 0 | 0 | — |
▸case-04 We are processing background subscription renewal payments from a queue. Network retries sometimes cause the worker to process the exact same payment job twice, charging customers double. A developer proposed deleting duplicate messages from the queue before processing. Provide the worker processing logic to guarantee idempotency. | pass→fail | 22,155 | 28,319 | +28% | 1 | 1 | 0% | 3,075 | 4,908 | +60% | 0 | 0 | — |
▸case-05 Our Python background worker fetches messages from AWS SQS to render large PDF reports, which takes 4 minutes. However, SQS re-delivers the message to another worker after 30 seconds while processing is still ongoing. The current approach is deleting the message immediately upon receipt before rendering starts. Show how to configure the queue and worker handling correctly. | pass→pass | 19,839 | 18,204 | -8% | 1 | 1 | 0% | 2,720 | 3,864 | +42% | 0 | 0 | — |
▸case-06 When background workers process invalid job payloads, the tasks fail repeatedly until max retry limits are reached, at which point the worker logs an error and drops the task entirely. Provide the queue architectural pattern configuration that prevents lost job data while allowing manual inspection of permanently failed jobs. | pass→pass | 16,066 | 21,836 | +36% | 1 | 1 | 0% | 2,715 | 3,469 | +28% | 0 | 0 | — |
▸case-07 Our Go background queue handler uses an unbuffered channel make(chan Job). During traffic spikes, incoming HTTP request handlers block synchronously while pushing jobs onto the worker channel, causing API latency to skyrocket to 15 seconds. A junior dev suggests making the API handler spawn go processJob() for every request without limit. Provide the proper Go worker queue architecture to manage backpressure safely. | pass→pass | 20,846 | 19,235 | -8% | 1 | 1 | 0% | 3,797 | 3,982 | +5% | 0 | 0 | — |
▸case-08 A background worker written in Python pops tasks from a Redis list using RPOP. When the worker process is killed by Kubernetes during task execution, the task is lost forever because it was already popped from Redis. A teammate suggested backing up the Redis database to disk every 1 second. Write the reliable worker queue pattern using Redis commands. | pass→pass | 23,576 | 23,429 | -1% | 1 | 1 | 0% | 2,936 | 3,813 | +30% | 0 | 0 | — |
▸case-09 A Python Celery background worker consumes memory linearly over time due to C extension memory leaks in a third-party image manipulation library, eventually triggering OOM kills after 24 hours. An engineer proposed scheduling a nightly reboot cron job on the worker host server. Provide the proper Celery worker configuration to manage worker memory safety. | pass→pass | 18,837 | 19,767 | +5% | 1 | 1 | 0% | 2,449 | 2,805 | +15% | 0 | 0 | — |
▸case-10 Our Node.js worker pool spawns 50 concurrent background workers. Each worker invocation creates a new PostgreSQL client connection, executes a query, and closes it. Under high load, PostgreSQL refuses incoming worker connections due to too many clients error. A developer suggested increasing PostgreSQL max_connections to 10,000. Show how the worker should handle database connectivity. | pass→pass | 15,480 | 19,473 | +26% | 1 | 1 | 0% | 2,745 | 3,831 | +40% | 0 | 0 | — |
▸case-11 A background worker task must recalculate analytics scores for 500,000 active user records. The current code executes SELECT * FROM users into a single Python list, causing memory exhaustion. A colleague suggested adding 64GB RAM to the worker server. Write the background worker batch processing logic to process these records safely. | pass→pass | 22,430 | 27,119 | +21% | 1 | 1 | 0% | 2,970 | 4,178 | +41% | 0 | 0 | — |
▸case-12 An e-commerce order confirmation endpoint sends SMTP emails directly inside the POST /checkout HTTP request handler using a synchronous network call. When the mail server is slow, checkouts take 8 seconds to return a response. Provide the backend pattern for decoupling email delivery from the HTTP request response cycle. | pass→pass | 18,913 | 16,038 | -15% | 1 | 1 | 0% | 2,541 | 3,294 | +30% | 0 | 0 | — |
▸case-13 Kubernetes liveness probes monitor our background worker by calling an HTTP endpoint hosted on the same Node.js event loop thread as worker execution. When a heavy CPU task blocks the event loop for 10 seconds, Kubernetes assumes the worker is dead and restarts it repeatedly. Provide the health check and heartbeat mechanism for background workers. | fail→pass | 20,743 | 28,301 | +36% | 1 | 1 | 0% | 3,771 | 4,983 | +32% | 0 | 0 | — |
▸case-14 A worker queue encounters a corrupted JSON message. Every time a worker pulls the task, JSON parsing throws a SyntaxError, the worker crashes, the queue re-delivers the message, and the worker crashes again in an infinite loop blocking all other queued messages. A developer suggests wrapping the entire worker loop in a try-catch that logs and ignores all exceptions universally. Show how to handle corrupted job payloads correctly. | pass→pass | 14,887 | 24,519 | +65% | 1 | 1 | 0% | 2,602 | 3,960 | +52% | 0 | 0 | — |
▸case-15 In a Python FastAPI application, background file processing is initiated using asyncio.create_task(process_file(file_id)). If process_file raises an exception during execution, the exception is silently swallowed and lost because nobody awaits the task. A developer suggested replacing asyncio.create_task with await process_file(file_id) synchronously. Provide the non-blocking Python background task pattern that captures background exceptions. | pass→fail | 18,430 | 15,381 | -17% | 1 | 1 | 0% | 2,572 | 3,150 | +22% | 0 | 0 | — |
▸case-16 A Python worker consumes messages from RabbitMQ using auto_ack=True. If the worker host loses power while processing a 30-second data transformation job, the message is lost forever because RabbitMQ acknowledged it immediately upon sending. Provide the RabbitMQ worker acknowledgement strategy to ensure zero message loss. | pass→pass | 21,462 | 23,372 | +9% | 1 | 1 | 0% | 2,923 | 4,623 | +58% | 0 | 0 | — |
▸case-17 Our system processes both critical password reset emails (must send in under 2 seconds) and bulk monthly analytics PDF generation (takes 5 minutes per job). Currently, all tasks enter a single FIFO Redis queue. When 500 PDF tasks enter the queue, password resets wait 30 minutes. A developer suggested increasing total worker count to 200. Provide the worker queue architecture for handling mixed priority workloads. | pass→fail | 24,603 | 25,128 | +2% | 1 | 1 | 0% | 3,339 | 3,981 | +19% | 0 | 0 | — |
▸case-18 Background workers process 1,000 tasks per minute that make calls to a third-party SMS API with a strict rate limit of 10 requests per second. When 20 workers execute concurrently, the third-party API returns HTTP 429 Too Many Requests and blocks our account. A developer suggested placing a time.sleep(0.1) in every worker. Write the rate limiting solution for distributed background workers. | pass→pass | 28,905 | 33,002 | +14% | 1 | 1 | 0% | 4,545 | 4,867 | +7% | 0 | 0 | — |
▸case-19 When a Go background worker receives SIGTERM during deployment, it attempts graceful shutdown. However, stuck database queries cause some workers to hang forever, blocking container termination until Kubernetes forcibly sends SIGKILL after 30 seconds. Show how to enforce a hard timeout during worker graceful shutdown. | fail→pass | 13,899 | 19,336 | +39% | 1 | 1 | 0% | 2,765 | 3,921 | +42% | 0 | 0 | — |
▸case-20 We have a scheduled background task that generates daily invoice summaries every night at midnight. The worker application is deployed across 5 load-balanced instances. At midnight, all 5 instances trigger the cron task simultaneously, creating duplicate invoice summaries. A developer suggested running cron on only 1 server manually. Show how to prevent duplicate scheduled job execution across multiple worker instances. | pass→pass | 19,882 | 19,618 | -1% | 1 | 1 | 0% | 2,757 | 4,026 | +46% | 0 | 0 | — |
▸case-21 Build a Node.js Express route handler for GET /users/:id that queries PostgreSQL for a user's record and returns the user object as JSON. Provide the Express route handler code. | pass→pass | 12,350 | 12,783 | +4% | 1 | 1 | 0% | 1,593 | 1,813 | +14% | 0 | 0 | — |
▸case-22 Write a PostgreSQL SQL database migration script that adds a foreign key constraint fk_orders_user from orders.user_id to users.id with ON DELETE CASCADE. | pass→pass | 7,406 | 10,950 | +48% | 1 | 1 | 0% | 1,248 | 2,165 | +73% | 0 | 0 | — |
▸case-23 In a Python GraphQL server using Strawberry, write a field resolver for author on a Book type that fetches the Author model from the database given author_id. Show the resolver implementation. | pass→pass | 8,461 | 14,482 | +71% | 1 | 1 | 0% | 1,650 | 2,094 | +27% | 0 | 0 | — |