Skip to content

v0.1.1

Latest

Choose a tag to compare

@erick-otenyo erick-otenyo released this 04 Jun 08:43

Initial release of django-task-ferry.

A reusable Django package for background job management with real-time progress tracking.

Features

  • Polymorphic job model — each job type has its own DB table via Django multi-table inheritance; no catch-all JSON blobs

  • Pluggable executors — ships with Celery, django-tasks (DEP-0014), and a synchronous ImmediateExecutor for tests

  • Per-job-type queue routing — set queue on a JobType to route it to a specific Celery queue; falls back to the global CELERY_QUEUE setting

  • Redis progress cache — progress is written to Redis mid-transaction and visible to API clients immediately, without waiting for a DB commit

  • Hierarchical progress — create child Progress objects for pipeline stages with unequal weights; children bubble up to the root automatically

  • Cooperative cancellation — running jobs check for cancellation on every progress.increment() call and raise JobCancelled when detected

  • DRF API — built-in list, detail, and cancel endpoints ready to mount under any URL prefix

  • Type registry — job types self-register in AppConfig.ready(); no central list to maintain

  • Periodic cleanup — JobHandler.cleanup_old_jobs() deletes ended jobs older than JOB_EXPIRY_DAYS (default 7), calling before_delete() hooks first

  • Per-job-type queue routing — set queue on a JobType to route it to a specific Celery queue; falls back to the global CELERY_QUEUE setting

  • Redis progress cache — progress is written to Redis mid-transaction and visible to API clients immediately, without waiting for a DB commit

  • Hierarchical progress — create child Progress objects for pipeline stages with unequal weights; children bubble up to the root automatically

  • Cooperative cancellation — running jobs check for cancellation on every progress.increment() call and raise JobCancelled when detected

  • DRF API — built-in list, detail, and cancel endpoints ready to mount under any URL prefix

  • Type registry — job types self-register in AppConfig.ready(); no central list to maintain

  • Periodic cleanup — JobHandler.cleanup_old_jobs() deletes ended jobs older than JOB_EXPIRY_DAYS (default 7), calling before_delete() hooks first

Requirements

  • Python 3.10+
  • Django 4.2, 5.0, or 5.1
  • Django REST Framework 3.14+
  • Celery 5.0+ (optional, for CeleryExecutor)
  • django-tasks 0.10+ (optional, for DjangoTasksExecutor)