batch-processing-jobs by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill batch-processing-jobs实现可扩展的批处理系统,用于高效处理大规模数据处理、计划任务和异步操作。
最小工作示例:
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) {
// 主处理队列
// ... (完整实现请参阅参考指南)
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| Bull Queue (Node.js) | Bull Queue (Node.js) |
| Celery-Style Worker (Python) | Celery-Style Worker (Python) |
| Cron Job Scheduler | Cron Job Scheduler |
每周安装量
132
代码仓库
GitHub 星标数
126
首次出现
2026年1月21日
安全审计
安装于
opencode112
gemini-cli109
codex106
cursor98
claude-code95
github-copilot89
Implement scalable batch processing systems for handling large-scale data processing, scheduled tasks, and async operations efficiently.
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)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Bull Queue (Node.js) | Bull Queue (Node.js) |
| Celery-Style Worker (Python) | Celery-Style Worker (Python) |
| Cron Job Scheduler | Cron Job Scheduler |
Weekly Installs
132
Repository
GitHub Stars
126
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode112
gemini-cli109
codex106
cursor98
claude-code95
github-copilot89
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
36,300 周安装