▸case-01 Write a TypeScript background job module that processes customer signups. The job is named 'user-signup-process' and receives an email and userId. Developers often export a simple async function or a bare Express route handler when starting out. Implement this as a background task definition using a modern background job framework for TypeScript. | pass→pass | 20,902 | 14,745 | -29% | 1 | 1 | 0% | 3,001 | 2,237 | -25% | 0 | 0 | — |
▸case-02 An automated video processing job downloads a video file, generates 3 resolution renditions, extracts audio to MP3, and generates AI captions. Currently, all four steps are written inside a single 500-line async function. Refactor this design using background job orchestration best practices in TypeScript so that failure in audio extraction does not require re-downloading or re-rendering video. | pass→pass | 27,083 | 24,952 | -8% | 1 | 1 | 0% | 4,119 | 4,406 | +7% | 0 | 0 | — |
▸case-03 A developer wrote a background task in TypeScript that processes order refunds. Throughout the task function, they placed console.log('Processing refund for order', orderId) and console.error('Refund failed', error). Update the logging strategy so log messages appear properly in the job platform's execution trace dashboard. | pass→pass | 19,096 | 12,742 | -33% | 1 | 1 | 0% | 2,457 | 1,864 | -24% | 0 | 0 | — |
▸case-04 Create a recurring background task in TypeScript that runs every night at midnight UTC ('0 0 * * *') to purge expired session tokens from the database. A developer suggests using node-cron with setInterval inside a standard web server process. Provide the framework task definition for a scheduled cron job. | pass→pass | 20,678 | 14,386 | -30% | 1 | 1 | 0% | 2,331 | 1,940 | -17% | 0 | 0 | — |
▸case-05 A background task generates blog post summaries using OpenAI's GPT model. The author wrote raw fetch('https://api.openai.com/v1/chat/completions', ...) calls directly inside a loop. Show how to implement this AI background task using structured task wrappers and official SDK integrations. | pass→pass | 18,475 | 19,382 | +5% | 1 | 1 | 0% | 3,378 | 2,565 | -24% | 0 | 0 | — |
▸case-06 A data synchronization job receives 10,000 product updates from an ERP system. The existing code uses 'for (const item of items) { await updateProduct(item); }' in a single background job run, causing execution timeouts. Refactor this to process items concurrently across distributed workers using batch triggering features. | fail→pass | 21,358 | 19,523 | -9% | 1 | 1 | 0% | 3,346 | 3,294 | -2% | 0 | 0 | — |
▸case-07 An API endpoint receives incoming Webhooks from GitHub when code is pushed. The current route handler runs linear code analysis taking 45 seconds directly inside the webhook HTTP request context, causing GitHub to time out. Refactor the HTTP handler and job definition to immediately acknowledge the webhook and offload processing. | fail→fail | 20,553 | 18,376 | -11% | 1 | 1 | 0% | 2,969 | 2,983 | +0% | 0 | 0 | — |
▸case-08 In a document indexer job, Task A parses a PDF file into text sections, and Task B generates embeddings for those text sections. A developer attempted to trigger Task B without waiting for Task A to complete, causing Task B to run on missing data. Write the parent task function that triggers Task A, waits for its result, and then passes that result to Task B. | pass→pass | 18,916 | 13,155 | -30% | 1 | 1 | 0% | 2,074 | 1,941 | -6% | 0 | 0 | — |
▸case-09 A background task fetches inventory from a third-party REST API that occasionally returns 503 errors. The developer implemented a manual retry loop using 'while (retries < 5)' and 'await new Promise(res => setTimeout(res, 5000))'. Replace this manual loop with declarative task retry configuration. | pass→pass | 20,270 | 13,674 | -33% | 1 | 1 | 0% | 2,811 | 1,882 | -33% | 0 | 0 | — |
▸case-10 An export job generates a 2GB CSV file, which takes 8 minutes. During execution, developers cannot tell if the task is frozen or active because there are no logs or state updates between start and finish. Refactor the task to emit structured progress logs and stage markers. | pass→pass | 31,905 | 20,644 | -35% | 1 | 1 | 0% | 4,263 | 3,352 | -21% | 0 | 0 | — |
▸case-11 A SaaS multi-tenant payment sync job encounters errors, but debugging is difficult because error logs only display console.error('Failed to sync') without details on tenantId, invoiceId, or attemptCount. Update the error handling code to attach key-value context to the log. | pass→pass | 15,467 | 8,820 | -43% | 1 | 1 | 0% | 1,954 | 2,003 | +3% | 0 | 0 | — |
▸case-12 A developer committed a hardcoded Stripe secret key 'const stripe = new Stripe("sk_test_51Mz123456789")' inside a background job module. Write the corrected task file referencing secret credentials from environment variables. | pass→pass | 13,702 | 43,241 | +216% | 1 | 1 | 0% | 1,354 | 1,748 | +29% | 0 | 0 | — |
▸case-13 A web scraper task hits a destination server that bans IPs making more than 3 simultaneous requests. The team tried managing state with a global array in memory. Configure the job's queue settings to enforce a maximum concurrency limit at the framework level. | pass→pass | 17,736 | 13,504 | -24% | 1 | 1 | 0% | 2,939 | 1,892 | -36% | 0 | 0 | — |
▸case-14 A background task processing user data wraps its logic in 'try { ... } catch (e) { console.log(e); }'. Because errors are caught without rethrowing or failing, the task runner reports status as successful. Fix the error handling to ensure job failures are recorded correctly. | pass→pass | 12,477 | 17,430 | +40% | 1 | 1 | 0% | 1,291 | 2,672 | +107% | 0 | 0 | — |
▸case-15 A notification application lets users choose custom alert times (e.g. User 1 wants 08:00 UTC, User 2 wants 14:00 UTC). A developer tried adding hardcoded cron triggers to the task file for each user. Write the code that registers scheduled tasks programmatically when a user updates their preference. | pass→pass | 15,717 | 20,480 | +30% | 1 | 1 | 0% | 3,001 | 3,273 | +9% | 0 | 0 | — |
▸case-16 A developer wrote a task definition with 'run: async (payload: any) => { console.log(payload.email.toLowerCase()); }', causing uncaught runtime exceptions when payload properties are missing or untyped. Refactor the task definition using TypeScript interface typing or schema validation. | pass→pass | 14,935 | 13,906 | -7% | 1 | 1 | 0% | 1,784 | 1,668 | -7% | 0 | 0 | — |
▸case-17 When a user downgrades their subscription, a background task must check account access after 14 days. The developer suggests spawning a long-lived Node process running 'await new Promise(r => setTimeout(r, 14 * 24 * 60 * 60 * 1000))'. Implement this using delayed task triggering. | pass→pass | 24,007 | 14,413 | -40% | 1 | 1 | 0% | 2,711 | 3,200 | +18% | 0 | 0 | — |
▸case-18 A team is building a background task that sends Slack messages. They wrote a custom HTTP client helper using axios.post to Slack's incoming webhook URL with manual error handling. Show how to structure background tasks using task modules and standard SDK logging/error boundaries rather than raw unmonitored HTTP requests. | pass→pass | 20,572 | 20,228 | -2% | 1 | 1 | 0% | 3,776 | 3,289 | -13% | 0 | 0 | — |
▸case-19 Duplicate payment events are triggering double charges when a webhook retries. The developer tried adding an in-memory Set of processed event IDs in Node.js, which clears on server restart. Configure the task trigger call using unique idempotency keys to prevent duplicate execution. | pass→pass | 20,947 | 11,768 | -44% | 1 | 1 | 0% | 2,899 | 2,385 | -18% | 0 | 0 | — |
▸case-20 Write a standard BullMQ worker and queue setup in Node.js using IORedis. The application needs a queue named 'emailQueue' and a Worker that listens to jobs on Redis running at localhost:6379. | pass→pass | 8,327 | 14,318 | +72% | 1 | 1 | 0% | 1,772 | 2,252 | +27% | 0 | 0 | — |
▸case-21 Create an Amazon States Language (ASL) JSON definition for an AWS Step Functions state machine that runs two AWS Lambda tasks in sequence: 'ExtractPdfText' followed by 'GenerateEmbeddings'. | pass→pass | 14,559 | 11,661 | -20% | 1 | 1 | 0% | 1,851 | 2,166 | +17% | 0 | 0 | — |
▸case-22 Write a basic Temporal workflow function in Go that calls an activity named 'ProcessPaymentActivity' passing a PaymentRequest struct. | pass→pass | 12,785 | 12,063 | -6% | 1 | 1 | 0% | 1,381 | 1,989 | +44% | 0 | 0 | — |