-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Job Handling Concept
-
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 -
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)