Skip to main content

Jentic Apitools Jobs - Async job execution

Project description

jobs

Async job execution with pluggable backends for running pipeline operations in the background. Supports in-memory thread pool (default) and optional Redis/Celery distributed execution.

Key Features

The jobs package provides a TaskRunner abstraction with two implementations: ThreadPoolRunner for in-memory execution using a thread pool, and CeleryRunner for distributed execution via Redis and Celery. A create_task_runner factory selects the appropriate runner based on configuration. Job state is tracked through JobStorage (with MemoryJobStorage and Redis-backed implementations). Progress is reported through ProgressReporter objects that support SSE streaming to API clients. Periodic cleanup removes expired jobs and optionally their output directories.

Dependencies

Internal: jentic.apitools.common, jentic.apitools.pipelines. Optional: redis, celery[redis].

Installation

uv add jobs

Quick Start

from jentic.apitools.jobs import create_task_runner
from jentic.apitools.common.models import JobOperation

runner = create_task_runner()
runner.storage.create_job("job-1", JobOperation.SCORE)
runner.submit_job("job-1", JobOperation.SCORE, {"spec_url": "https://example.com/api.json"})

Testing

uv run --package jobs pytest packages/jobs/tests -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jentic_apitools_jobs-0.0.0a5-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file jentic_apitools_jobs-0.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for jentic_apitools_jobs-0.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 3fafe1b2b7307b927f7e668dbb3fb5e47404fbcf7a20c3609de8ad4d5f52b5d5
MD5 9f13b26f3b81076ed5447f21e0dc7646
BLAKE2b-256 49212197a96381190b4cd2c4426b2a6716c6e31780981cf2a6687c727b778ca8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page