Skip to main content

Jentic Apitools Jobs - Async job execution

Project description

Jentic API Tools - 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. Supported JobOperation values are IMPORT, SCORE, IMPROVE, and QA; the corresponding processors (process_import, process_score, process_improve) live in jobs.processors and are dispatched by both the in-memory and Celery runners.

Dependencies

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

Installation

pip install jentic-apitools-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

pytest 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 Distribution

jentic_apitools_jobs-1.0.0a20.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

jentic_apitools_jobs-1.0.0a20-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file jentic_apitools_jobs-1.0.0a20.tar.gz.

File metadata

  • Download URL: jentic_apitools_jobs-1.0.0a20.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jentic_apitools_jobs-1.0.0a20.tar.gz
Algorithm Hash digest
SHA256 4577b2468c1fff190092f235b2909045f00fa90229dc5bbcac6bfd5fd49c69ac
MD5 2e5d09944d7a3b1b462d3f06442903af
BLAKE2b-256 ebcf46fa0c8b65b7305934f68ddc3bc6fdc564fd3c5de3766c0f37e5037550a8

See more details on using hashes here.

File details

Details for the file jentic_apitools_jobs-1.0.0a20-py3-none-any.whl.

File metadata

File hashes

Hashes for jentic_apitools_jobs-1.0.0a20-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd473c0acec44956f3d19af57d13d0f446c19592c0f8518e1b30f5bf28164ad
MD5 4dcaa1ac1be6c2e3d545acae1f1cbb1b
BLAKE2b-256 bb5165083e18ffd0fd74318b13ff286947678a5d1c3de0c29602d677a4a2ed3a

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