mcpField
B
batch-processing-jobs

batch-processing-jobs

github.com/aj-geddesDevelopment373475 installsUpdated 34w ago
Repository

About batch-processing-jobs

A reference skill for building batch-processing systems for large datasets, scheduled work, and asynchronous tasks. It includes queue, worker, and scheduler examples across common languages and patterns.

Key features

  1. 01Bull Queue and Celery-style examples
  2. 02Cron scheduler guidance
  3. 03Retries and dead-letter queues
  4. 04Job priorities and monitoring

Use cases

  1. 01Processing large datasets
  2. 02Generating scheduled reports
  3. 03Running ETL and data transfers
  4. 04Handling bulk updates or cleanup jobs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill batch-processing-jobs

After installing, type/batch-processing-jobsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
bull-queue-nodejs.md
celery-style-worker-python.md
cron-job-scheduler.md
scripts/
validate-pipeline.sh
templates/
pipeline.yaml

Details

From the project README

Batch Processing Jobs

Table of Contents

Overview

Implement scalable batch processing systems for handling large-scale data processing, scheduled tasks, and async operations efficiently.

When to Use

  • Processing large datasets
  • Scheduled report generation
  • Email/notification campaigns
  • Data imports and exports
  • Image/video processing
  • ETL pipelines
  • Cleanup and maintenance tasks
  • Long-running computations
  • Bulk data updates

Quick Start

Minimal working example:

import Queue from "bull";
import { v4 as uuidv4 } from "uuid";

interface JobData {
  id: string;
  type: string;
  payload: any;
  userId?: string;
  metadata?: Record<string, any>;
}

interface JobResult {
  success: boolean;
  data?: any;
  error?: string;
  processedAt: number;
  duration: number;
}

class BatchProcessor {
  private queue: Queue.Queue<JobData>;
  private resultQueue: Queue.Queue<JobResult>;

  constructor(redisUrl: string) {
    // Main processing queue
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Bull Queue (Node.js)Bull Queue (Node.js)
Celery-Style Worker (Python)Celery-Style Worker (Python)
Cron Job SchedulerCron Job Scheduler

Best Practices

✅ DO
  • Implement idempotency for all jobs
  • Use job queues for distributed processing
  • Monitor job success/failure rates
  • Implement retry logic with exponential backoff
  • Set appropriate timeouts
  • Log job execution details
  • Use dead letter queues for failed jobs
  • Implement job priority levels
  • Batch similar operations together
  • Use connection pooling
  • Implement graceful shutdown
  • Monitor queue depth and processing time
❌ DON'T
  • Process jobs synchronously in request handlers
  • Ignore failed jobs
  • Set unlimited retries
  • Skip monitoring and alerting
  • Process jobs without timeouts
  • Store large payloads in queue
  • Forget to clean up completed jobs

Comments

Markdown supported