smithery.ai

backend-async-tasks

Use when creating or updating Celery tasks, async job logic, or Beat schedules in the backend.

First seen Mar 22, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,364 B
  • docs SUMMARY.md 121 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Backend async tasks (Celery)

When to use

  • You are adding or changing a Celery task in backend/src/backend/apps/**/tasks.py.
  • You need to update the Celery Beat schedule in backend/src/backend/celery_app.py.
  • You are adding DB access inside a Celery worker process.

Steps

  1. Define tasks only in a tasks.py file under the relevant app module.
  2. Decorate tasks with @app.task imported from backend.celery_app.
  3. Return a typed result (int, None, etc.). Keep task-specific parameters

local unless they must be environment-configured.

  1. For DB access:

- Use asyncio.run() to bridge async work. - Always acquire a session via gettasksession() from backend.celery_app.

  1. For periodic jobs, update app.conf.beat_schedule in

backend/src/backend/celery_app.py and use celery.schedules.crontab.

Constraints and guardrails

  • Never use the global alchemy_config engine inside a task; it is not fork-safe

for Celery workers.

  • Always use gettasksession() to manage DB connections safely across worker

processes.

References

  • backend/src/backend/apps/**/tasks.py
  • backend/src/backend/celery_app.py
  • backend/tests/apps/users/test_tasks.py