Skip to content

Implement Job Manager #659

@Lucas0T

Description

@Lucas0T

Job Handling Concept

  1. Global Job Manager Service

    Service in the application (one instance)
    Manages a job registry (in-memory + persisted directly in the filesystem where the bundles are located)
    Responsible for:
    Creating jobs (from incoming FHIR Task requests)
    Tracking job lifecycle
    Handling scheduling & queuing
    Restarting jobs from checkpoints
    Cleaning up old/finished jobs
    Provides API endpoints via FHIR Task to list, delete/cancel, and query jobs

  2. Job Class

    Each job is represented by a Job object that are persisted
    Contains:
    jobId : UUID (time based)
    status : PENDING | RUNNING | PAUSED | FAILED | COMPLETED
    progress : {lastBatchIndex, lastPatientRef, checkoint reference}
    issues : List of OperationOutcome.issue (errors/warnings)
    startedAt, updatedAt, finishedAt
    The Job entity can be parsed or serialized to lightweight JSON (fits in JSON DB or SQL row)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions