Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

async-jobs异步作业

Agent Skill

async-jobs 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,904

周安装

121

GitHub Stars

160

下载量

968
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:async-jobs(异步作业)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/async-jobs
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill async-jobs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill async-jobs

简介

async-jobs 提供异步任务处理模式,支持 Celery、ARQ 和 Redis 等主流工具。

  • 适用于需要后台任务队列、工作流编排、重试策略及生产监控的场景。
  • 通过引用规则文件按需加载,涵盖配置、路由、工作流和限流等模块。
  • 安装方式:github,建议确认权限范围和维护状态后再部署使用。
  • 注意可能涉及联网、命令执行或文件读写操作,需评估安全风险。

SKILL.md

Async Jobs

Patterns for background task processing with Celery, ARQ, and Redis. Covers task queues, canvas workflows, scheduling, retry strategies, rate limiting, and production monitoring. Each category has individual rule files in references/ loaded on-demand.

Quick Reference

CategoryRulesImpactWhen to Use
Configurationcelery-configHIGHCelery app setup, broker, serialization, worker tuning
Task Routingtask-routingHIGHPriority queues, multi-queue workers, dynamic routing
Canvas Workflowscanvas-workflowsHIGHChain, group, chord, nested workflows
Retry Strategiesretry-strategiesHIGHExponential backoff, idempotency, dead letter queues
Schedulingscheduled-tasksMEDIUMCelery Beat, crontab, database-backed schedules
Monitoringmonitoring-healthMEDIUMFlower, custom events, health checks, metrics
Result Backendsresult-backendsMEDIUMRedis results, custom states, progress tracking
ARQ Patternsarq-patternsMEDIUMAsync Redis Queue for FastAPI, lightweight jobs
Temporal Workflowstemporal-workflowsHIGHDurable workflow definitions, sagas, signals, queries
Temporal Activitiestemporal-activitiesHIGHActivity patterns, workers, heartbeats, testing

Total: 10 rules across 9 categories

Quick Start

@app.task(bind=True, max_retries=3, default_retry_delay=60)
def process_payment(self, order_id: str):
    try:
        return gateway.charge(order_id)
    except TransientError as exc:
        raise self.retry(exc=exc, countdown=2 ** self.request.retries * 60)

Load more examples: Read("${CLAUDE_SKILL_DIR}/references/quick-start-examples.md") for Celery retry task and ARQ/FastAPI integration patterns.

Configuration

Production Celery app configuration with secure defaults and worker tuning.

Key Patterns

  • JSON serialization with task_serializer="json" for safety
  • Late acknowledgment with task_acks_late=True to prevent task loss on crash
  • Time limits with both task_time_limit (hard) and task_soft_time_limit (soft)
  • Fair distribution with worker_prefetch_multiplier=1
  • Reject on lost with task_reject_on_worker_lost=True

Key Decisions

DecisionRecommendation
SerializerJSON (never pickle)
Ack modeLate ack (task_acks_late=True)
Prefetch1 for fair, 4-8 for throughput
Time limitsoft < hard (e.g., 540/600)
TimezoneUTC always

Task Routing

Priority queue configuration with multi-queue workers and dynamic routing.

Key Patterns

  • Named queues for critical/high/default/low/bulk separation
  • Redis priority with queue_order_strategy: "priority" and 0-9 levels
  • Task router classes for dynamic routing based on task attributes
  • Per-queue workers with tuned concurrency and prefetch settings
  • Content-based routing for dynamic workflow dispatch

Key Decisions

DecisionRecommendation
Queue count3-5 (critical/high/default/low/bulk)
Priority levels0-9 with Redis x-max-priority
Worker assignmentDedicated workers per queue
Prefetch1 for critical, 4-8 for bulk
RoutingRouter class for 5+ routing rules

Canvas Workflows

Celery canvas primitives for sequential, parallel, and fan-in/fan-out workflows.

Key Patterns

  • Chain for sequential ETL pipelines with result passing
  • Group for parallel execution of independent tasks
  • Chord for fan-out/fan-in with aggregation callback
  • Immutable signatures (si()) for steps that ignore input
  • Nested workflows combining groups inside chains
  • Link error callbacks for workflow-level error handling

Key Decisions

DecisionRecommendation
SequentialChain with s()
ParallelGroup for independent tasks
Fan-inChord (all must succeed for callback)
Ignore inputUse si() immutable signature
Error in chainReject stops chain, retry continues
Partial failuresReturn error dict in chord tasks

Retry Strategies

Retry patterns with exponential backoff, idempotency, and dead letter queues.

Key Patterns

  • Exponential backoff with retry_backoff=True and retry_backoff_max
  • Jitter with retry_jitter=True to prevent thundering herd
  • Idempotency keys in Redis to prevent duplicate processing
  • Dead letter queues for failed tasks requiring manual review
  • Task locking to prevent concurrent execution of singleton tasks
  • Base task classes with shared retry configuration

Key Decisions

DecisionRecommendation
Retry delayExponential backoff with jitter
Max retries3-5 for transient, 0 for permanent
IdempotencyRedis key with TTL
Failed tasksDLQ for manual review
SingletonRedis lock with TTL

Scheduling

Celery Beat periodic task configuration with crontab, database-backed schedules, and overlap prevention.

Key Patterns

  • Crontab for time-based schedules (daily, weekly, monthly)
  • Interval for fixed-frequency tasks (every N seconds)
  • Database scheduler with django-celery-beat for dynamic schedules
  • Schedule locks to prevent overlapping long-running scheduled tasks
  • Adaptive polling with self-rescheduling tasks

Key Decisions

DecisionRecommendation
Schedule typeCrontab for time-based, interval for frequency
DynamicDatabase scheduler (django-celery-beat)
OverlapRedis lock with timeout
Beat processSeparate process (not embedded)
TimezoneUTC always

Monitoring

Production monitoring with Flower, custom signals, health checks, and Prometheus metrics.

Key Patterns

  • Flower dashboard for real-time task monitoring
  • Celery signals (task_prerun, task_postrun, task_failure) for metrics
  • Health check endpoint verifying broker connection and active workers
  • Queue depth monitoring for autoscaling decisions
  • Beat monitoring for scheduled task dispatch tracking

Key Decisions

DecisionRecommendation
DashboardFlower with persistent storage
MetricsPrometheus via celery signals
HealthBroker + worker + queue depth
AlertingSignal on task_failure
AutoscaleQueue depth > threshold

Result Backends

Task result storage, custom states, and progress tracking patterns.

Key Patterns

  • Redis backend for task status and small results
  • Custom task states (VALIDATING, PROCESSING, UPLOADING) for progress
  • update_state() for real-time progress reporting
  • S3/database for large result storage (never Redis)
  • AsyncResult for querying task state and progress

Key Decisions

DecisionRecommendation
Status storageRedis result backend
Large resultsS3 or database (never Redis)
ProgressCustom states with update_state()
Result queryAsyncResult with state checks

ARQ Patterns

Lightweight async Redis Queue for FastAPI and simple background tasks.

Key Patterns

  • Native async/await with arq for FastAPI integration
  • Worker lifecycle with startup/shutdown hooks for resource management
  • Job enqueue from FastAPI routes with enqueue_job()
  • Job status tracking with Job.status() and Job.result()
  • Delayed tasks with _delay=timedelta() for deferred execution

Key Decisions

DecisionRecommendation
Simple asyncARQ (native async)
Complex workflowsCelery (chains, chords)
In-process quickFastAPI BackgroundTasks
LLM workflowsLangGraph (not Celery)

Tool Selection

Load: Read("${CLAUDE_SKILL_DIR}/references/quick-start-examples.md") for the full tool comparison table (ARQ, Celery, RQ, Dramatiq, FastAPI BackgroundTasks).

Anti-Patterns (FORBIDDEN)

Load details: Read("${CLAUDE_SKILL_DIR}/references/anti-patterns.md") for full list.

Key rules: never run long tasks in request handlers, never block on results inside tasks, never store large results in Redis, always use idempotency for retried tasks.

Temporal Workflows

Durable execution engine for reliable distributed applications with Temporal.io.

Key Patterns

  • Workflow definitions with @workflow.defn and deterministic code
  • Saga pattern with compensation for multi-step transactions
  • Signals and queries for external interaction with running workflows
  • Timers with workflow.wait_condition() for human-in-the-loop
  • Parallel activities via asyncio.gather inside workflows

Key Decisions

DecisionRecommendation
Workflow IDBusiness-meaningful, idempotent
DeterminismUse workflow.random(), workflow.now()
I/OAlways via activities, never directly

Temporal Activities

Activity and worker patterns for Temporal.io I/O operations.

Key Patterns

  • Activity definitions with @activity.defn for all I/O
  • Heartbeating for long-running activities (> 60s)
  • Error classification with ApplicationError(non_retryable=True) for business errors
  • Worker configuration with dedicated task queues
  • Testing with WorkflowEnvironment.start_local()

Key Decisions

DecisionRecommendation
Activity timeoutstart_to_close for most cases
Error handlingNon-retryable for business errors
TestingWorkflowEnvironment for integration tests

Related Skills

  • ork:python-backend - FastAPI, asyncio, SQLAlchemy patterns
  • ork:langgraph - LangGraph workflow patterns (use for LLM workflows, not Celery)
  • ork:distributed-systems - Resilience patterns, circuit breakers
  • ork:monitoring-observability - Metrics and alerting

Capability Details

Load details: Read("${CLAUDE_SKILL_DIR}/references/capability-details.md") for full keyword index and problem-solution mapping across all 8 capabilities.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.53%
按下载量换算344

Claude

29.26%
按下载量换算283

Cursor

20.41%
按下载量换算198

Gemini CLI

9.04%
按下载量换算88

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills