Async Jobs logo

Async Jobs

Community
yonatangross
async-jobs

Async job processing patterns for background tasks, Celery workflows, task scheduling, retry strategies, and distributed task execution. Use when implementing background job processing, task queues, or scheduled task systems.

Overview

Publisheryonatangross
Repositoryorchestkit
Skill nameasync-jobs
Stars
298
Forks
35
Bundled files
15
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 15 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by yonatangross on GitHub. Read the source before you install it.

Installation

Install the Async Jobs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/async-jobs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yonatangross/orchestkit.git /tmp/orchestkit
mkdir -p .claude/skills
cp -r /tmp/orchestkit/plugins/ork/skills/async-jobs .claude/skills/async-jobs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Async Jobs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Async Jobs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Async Jobs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Async Jobs

Background task processing with Celery, ARQ, Redis and Temporal. This skill is a wrapper, not a manual: Celery and ARQ document their own product well, so what lives here is our delta, the thresholds, working config, ordering constraints and tool-choice rules we picked. Product mechanics are linked, not restated.

Start with Read("references/ork-delta.md").

Quick Reference

TopicWhere our part lives
Configurationreferences/celery-config.md, rules/jobs-task-queue.md
Task Routingreferences/ork-delta.md (queue taxonomy, prefetch tiers, Redis priority)
Canvas Workflowsrules/celery-canvas.md
Retry Strategiesreferences/ork-delta.md (backoff cap, idempotency layers, lock TTLs)
Schedulingrules/jobs-scheduling.md, references/ork-delta.md (beat process model)
Monitoringreferences/ork-delta.md (alert thresholds, histogram buckets)
Result Backendsrules/jobs-monitoring.md, references/ork-delta.md (return contract)
ARQ Patternsrules/jobs-task-queue.md, references/ork-delta.md (budgets, pool ownership)
Temporal Workflowsrules/temporal-workflows.md
Temporal Activitiesrules/temporal-activities.md

10 topic areas, 6 rule files in rules/, house delta in references/ork-delta.md.

Quick Start

python
@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("references/quick-start-examples.md") for Celery retry task and ARQ/FastAPI integration patterns.

Upstream coverage (do not restate)

Fetch these when you need product mechanics. The right-hand column is the part we keep, because it is a house threshold, a working config or an ordering constraint that upstream cannot know.

TopicFirst-party sourceHouse subset stays in
Celery settings, serializers, time limits, worker flagshttps://docs.celeryq.dev/en/stable/userguide/configuration.html and .../optimizing.htmlreferences/celery-config.md, rules/jobs-task-queue.md
Queue declarations, router classes, Redis priority mechanicshttps://docs.celeryq.dev/en/stable/userguide/routing.htmlreferences/ork-delta.md
chain / group / chord / signature semanticshttps://docs.celeryq.dev/en/stable/userguide/canvas.htmlrules/celery-canvas.md keeps the house canvas subset. Its si()-in-chords guidance is UNVERIFIED and contested: confirm the argument-passing behaviour against the upstream canvas page before relying on it
autoretry_for, retry_backoff, Reject, task base classeshttps://docs.celeryq.dev/en/stable/userguide/tasks.htmlreferences/ork-delta.md, rules/jobs-task-queue.md
Beat schedules, crontab syntax, DatabaseSchedulerhttps://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html and https://django-celery-beat.readthedocs.io/en/latest/rules/jobs-scheduling.md keeps our beat_schedule shapes; references/ork-delta.md keeps the process model
Flower flags, inspect, signal nameshttps://docs.celeryq.dev/en/stable/userguide/monitoring.html, https://docs.celeryq.dev/en/stable/userguide/signals.html, https://flower.readthedocs.io/en/latest/config.htmlreferences/ork-delta.md
Result backend, AsyncResult, custom stateshttps://docs.celeryq.dev/en/stable/userguide/configuration.htmlrules/jobs-monitoring.md keeps our status endpoints and update_state() usage
Per-task rate_limit, control.rate_limit, Redis Luahttps://docs.celeryq.dev/en/stable/userguide/workers.html, https://redis.io/docs/latest/develop/programmability/eval-intro/references/ork-delta.md
ARQ WorkerSettings, enqueue_job, _defer_by / _defer_until, Job statushttps://arq-docs.helpmanual.io/rules/jobs-task-queue.md keeps the worker skeleton; references/ork-delta.md keeps the budgets
FastAPI lifespan and dependency wiringhttps://fastapi.tiangolo.com/advanced/events/references/ork-delta.md
Distributed locks with SET NX EXhttps://redis.io/docs/latest/commands/set/references/ork-delta.md

Configuration

Load: Read("references/celery-config.md").

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

Task Routing

DecisionRecommendation
Queue count5: critical / high / default / low / bulk
Priority levels0-9, with all four Redis priority switches set together
Worker assignmentDedicated worker per queue
Prefetch1 critical, 2 high, 4 default, 8 low/bulk
RoutingRouter class once past 5 routing rules

Canvas Workflows

Load: Read("rules/celery-canvas.md").

DecisionRecommendation
SequentialChain with s()
ParallelGroup for independent tasks
Fan-inChord (all header tasks must succeed for the body to run)
Ignore inputUse si() immutable signature
Error in chainReject stops the chain, retry continues it
Partial failuresReturn an error dict from chord header tasks

Retry Strategies

DecisionRecommendation
Retry delayExponential backoff, jitter on, capped at 600s
Max retries3-5 for transient, 0 for permanent
IdempotencyRedis marker (86400s TTL) plus the vendor idempotency key
Failed tasksDLQ for manual review
SingletonRedis lock with a TTL longer than the hard time limit

Scheduling

Load: Read("rules/jobs-scheduling.md").

DecisionRecommendation
Schedule typeCrontab for time-based, float interval for frequency
DynamicDatabaseScheduler (django-celery-beat)
OverlapRedis lock, 3600s default and 7200s for long jobs
Beat processSeparate process; embedded --beat is development only
TimezoneUTC always

Monitoring

DecisionRecommendation
DashboardFlower with persistent storage
MetricsPrometheus wired to task_prerun / task_postrun / task_failure
HealthBroker reachable, at least one worker, queue depths
Alertingcritical > 100, default > 5000, workers < 1
AutoscaleQueue depth > 500

Result Backends

Load: Read("rules/jobs-monitoring.md").

DecisionRecommendation
Status storageRedis result backend, status and small JSON only
Large resultsS3 or database, task returns a reference dict
ProgressCustom states with update_state()
Result queryAsyncResult with state checks

ARQ Patterns

Load: Read("rules/jobs-task-queue.md").

DecisionRecommendation
Simple asyncARQ (native async), max_jobs=10, job_timeout=300
Pool ownershipFastAPI lifespan, never a per-request create_pool
Complex workflowsCelery (chains, chords, DLQ, per-task rate limits)
In-process quickFastAPI BackgroundTasks, under 30s, non-critical only
LLM workflowsLangGraph, not Celery

Tool Selection

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

Anti-Patterns (FORBIDDEN)

Load details: Read("references/anti-patterns.md") for the 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

Load: Read("rules/temporal-workflows.md").

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

Temporal Activities

Load: Read("rules/temporal-activities.md").

DecisionRecommendation
Activity timeoutstart_to_close for most cases
Error handlingNon-retryable for business errors
TestingWorkflowEnvironment.start_local() 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("references/capability-details.md") for the keyword index and problem-to-capability mapping.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Async Jobs AI skill do?

Async job processing patterns for background tasks, Celery workflows, task scheduling, retry strategies, and distributed task execution. Use when implementing background job processing, task queues, or scheduled task systems.

Why use Async Jobs on TypingMind?

Because you install it once and use it with any model. Async Jobs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Async Jobs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/async-jobs. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Async Jobs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Async Jobs?

As many as you like. As long as a model supports skills, you can use Async Jobs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Async Jobs AI skill free?

Yes. It is published on GitHub by yonatangross under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇