Skip to content

JobPausedOfflineEvent

EventType: JOB_PAUSED_OFFLINEDomain: production Broker subject: progress.notification.production

Pauses a job that was detected as offline (e.g., operator disconnected without explicitly pausing). Records the work_session_end timestamp so the work session duration is accurate even when the session was not closed gracefully.

Trigger

Triggered by: POST /event (universal event dispatcher)

Dispatched via POST /event in backend/api/endpoints/traceability.py with event_type: JOB_PAUSED_OFFLINE. Typically called by a background heartbeat monitor rather than directly by the operator.

Preconditions

  • Job exists with key info.job_key
  • Job stage is STARTED

State Changes (Transaction)

Collections: Inherited from BaseProductionEvent.get_tx_collections()

  • Job updated: stage → PAUSED
  • WorkSession closed with the provided work_session_end timestamp

Side Effects (post_processing)

JobPausedOfflineEvent sets _notification_subtopic = "production" explicitly. Publishes to progress.notification.production after commit.

InfoModel Fields

FieldTypeDescription
job_keystrArangoDB key of the job
work_session_enddatetime | NoneTimestamp to record as session end
work_order_keystr | NoneWork order key
phase_keystr | NonePhase key

None.

Source

JobPausedOfflineEvent on GitHub

Released under the Apache 2.0 License.