Skip to main content

taskferry-procrastinate

Run Taskferry tasks on Procrastinate — a durable, PostgreSQL-backed task engine.

flowchart LR
    APP["Application"]
    TP["Taskferry"]
    AD["taskferry-procrastinate"]
    PRO["Procrastinate"]
    PG["PostgreSQL"]

    APP --> TP --> AD --> PRO --> PG

Taskferry does not implement a queue, a worker, job reservation or retries. Procrastinate already does all of that, correctly, on PostgreSQL. This package is the translation layer between the two — and nothing else.

Install

pip install 'taskferry-procrastinate[procrastinate]'

PostgreSQL becomes a dependency of your deployment only once you select this backend. taskferry itself has no dependencies at all.

Submitting

from taskferry import Taskferry

runtime = Taskferry.from_mapping(
    {
        "backends": {"pg": {"factory": "procrastinate", "app": "myapp.tasks:app"}},
        "defaults": {"task": "pg"},
    }
)

runtime.tasks.submit("myapp.tasks:refresh_metadata", 42, queue="metadata")

Executing

Register the dispatcher once, then run Procrastinate's own worker:

# myapp/tasks.py
from procrastinate import App, PsycopgConnector
from taskferry import FunctionRegistry
from taskferry_procrastinate import register_dispatcher

app = App(connector=PsycopgConnector(conninfo="postgresql://..."))

# An allowlist matters: task names arrive from the queue.
register_dispatcher(app, registry=FunctionRegistry(allowed_modules=["myapp"]))
procrastinate --app=myapp.tasks.app worker

Capabilities

Capability Supported How
SUBMIT yes defer()
STATE yes job manager
CANCEL yes cancel_job_by_id
DELAY yes schedule_at
PRIORITY yes native job priority
RETRY yes engine-owned, via the retry signal
DEDUPLICATION yes queueing_lock
RESULT no Procrastinate stores no return values

RESULT is absent because Procrastinate genuinely does not keep results. Taskferry raises UnsupportedCapability rather than inventing a results table — building queue features is precisely what this project exists not to do.

Backend options

TaskSpec(
    task="myapp.tasks:reindex",
    backend_options=BackendOptions(
        {
            "procrastinate": {
                "lock": "reindex-42",  # serialise jobs against a key
                "queueing_lock": "reindex",  # refuse a duplicate while one is pending
            }
        }
    ),
)

License

Apache-2.0.

Release files for taskferry-procrastinate 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskferry-procrastinate 0.2.0
File Size Uploaded
taskferry_procrastinate-0.2.0.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskferry-procrastinate 0.2.0
File Interpreter ABI Platform
taskferry_procrastinate-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / taskferry_procrastinate-0.2.0.tar.gz

Download URL taskferry_procrastinate-0.2.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3b077b2aa361205c4133200a7306c797876162d3166fbcf4794e5bfd8ffbc8ae
BLAKE2b-256 checksum
How to use checksums
bbec3c97ac8e977a4d4c2f0d6267d50740ded6add6c39478cbe6613cda114061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / taskferry_procrastinate-0.2.0-py3-none-any.whl

Download URL taskferry_procrastinate-0.2.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a77042b40f17122306add50640958ee5c15a5190983ec8a3baf9a9af4d67e71
BLAKE2b-256 checksum
How to use checksums
b1c8d5e7c8e98ad1f5ac43e94b15ca70c0a0f538f76915bf1d74ed718762be54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page