Skip to main content

A Command line tool for the dicom processor library

Project description

dcm-processor-worker

dcm-processor-worker is the execution layer for queued jobs in the dcm-processor platform.

It is responsible for taking scheduled work and actually running the service code.

Role In The Bigger Picture

This module sits at the end of the scheduling chain.

The high-level flow is:

  1. DICOM data is ingested and stored
  2. the scheduler creates queued jobs
  3. worker consumers pick up those jobs
  4. this module executes the requested callback

So this package is the runtime engine that turns job definitions into actual code execution.

Main Responsibilities

1. Worker Type Registration

The package supports different worker implementations and registers them through WorkerManager.

Currently supported types include:

  • venv-based workers
  • Docker-based workers
  • the default local service execution path

2. Worker Installation

The module installs worker environments from package content.

This includes:

  • building or pulling Docker images
  • creating Python virtual environments
  • installing Python dependencies
  • storing worker-side support files

3. Job Execution

When a queued job is consumed, this module:

  • loads the job record
  • loads the service module artifact
  • prepares the runtime environment
  • injects service runtime env vars
  • executes the requested callback
  • returns the result or error payload

4. Pre/Post Service Hooks

The module also exposes entry points for:

  • pre-service execution
  • post-service execution

These are scheduled by the job scheduler around the main service jobs.

Key Internal Areas

  • dcm_processor_worker/manager.py
    • central worker dispatch and environment preparation
  • dcm_processor_worker/venv_worker.py
    • Python virtual environment worker implementation
  • dcm_processor_worker/docker_worker.py
    • Docker-based worker implementation
  • dcm_processor_worker/venv_worker_lib.py
    • venv creation and generated wrapper execution helpers
  • dcm_processor_worker/base.py
    • base worker contract

Dependencies On Other Modules

This module depends mainly on:

  • dcm-processor-db-provider
    • for job, service, and worker data plus component files
  • dcm-processor-utils
    • for shared helpers such as device and archive logic

It works directly with:

  • dcm-processor-job-scheduler
    • which creates the jobs this module executes
  • dcm-processor-service
    • which is the runtime helper layer available to executed service code

What This Module Is Not

This package is not:

  • the scheduler
  • the DICOM listener
  • the main CLI
  • the persistence layer

It is the execution runtime for scheduled processing work.

Summary

Use this module when you need to install or run worker environments for dcm-processor jobs.

It is the piece of the system that actually runs the processing callbacks defined by installed packages.

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

dcm_processor_worker-0.0.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

dcm_processor_worker-0.0.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file dcm_processor_worker-0.0.1.tar.gz.

File metadata

  • Download URL: dcm_processor_worker-0.0.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for dcm_processor_worker-0.0.1.tar.gz
Algorithm Hash digest
SHA256 77bba7fbbfcbe7b4e4076735c8ab2bec45bb7676dffefaf24ed0caffb4652e3f
MD5 ce71e8222c80fdbdb4c89a79a3eb0fe6
BLAKE2b-256 9c068671e03cc8c8e1c9d37923ebd9aecd4d87d3ba9b61c4dc45832759968f04

See more details on using hashes here.

File details

Details for the file dcm_processor_worker-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dcm_processor_worker-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4db7d71804dc7e8fb2842c711239cf4362f2b7377a4d0549da606c52d91e5af
MD5 f519433a4a48d620c009caa247e33c38
BLAKE2b-256 0b0b10d801a8d849d1ea90d6d42d8419eb99a5f426f3598a51e1dbe56b96ff70

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