ImagingTools Core SDK
Public Types | Public Member Functions | List of all members
imthype::IJobExecutionLogabstract

#include <IJobExecutionLog.h>

Inheritance diagram for imthype::IJobExecutionLog:
imthype::CJobExecutionLog

Public Types

enum  ExecutionEventType {
  EET_JOB_CREATED , EET_JOB_ACCEPTED , EET_JOB_STARTED , EET_STATUS_CHANGED ,
  EET_PROGRESS_UPDATED , EET_JOB_PAUSED , EET_JOB_RESUMED , EET_JOB_CANCELLED ,
  EET_JOB_COMPLETED , EET_JOB_FAILED
}
 

Public Member Functions

virtual void LogExecutionEvent (ExecutionEventType eventType, const QString &message, const QDateTime &timestamp=QDateTime::currentDateTime())=0
 
virtual ilog::IMessageContainer::Messages GetExecutionEvents (ExecutionEventType eventType) const =0
 

Detailed Description

Interface for job execution log.

This log tracks system-level events from the job controller, including lifecycle events, state transitions, and control flow operations. This is distinct from the processor/worker log which contains actual processing output from the worker doing the job.

Definition at line 21 of file IJobExecutionLog.h.

Member Enumeration Documentation

◆ ExecutionEventType

Log entry types specific to job execution tracking.

Enumerator
EET_JOB_CREATED 

Job was created and inserted into queue.

EET_JOB_ACCEPTED 

Job was accepted by job dispatcher.

EET_JOB_STARTED 

Job execution started.

EET_STATUS_CHANGED 

Job status changed.

EET_PROGRESS_UPDATED 

Job progress updated.

EET_JOB_PAUSED 

Job was paused.

EET_JOB_RESUMED 

Job was resumed.

EET_JOB_CANCELLED 

Job was cancelled.

EET_JOB_COMPLETED 

Job completed successfully.

EET_JOB_FAILED 

Job failed with error.

Definition at line 27 of file IJobExecutionLog.h.

Member Function Documentation

◆ GetExecutionEvents()

virtual ilog::IMessageContainer::Messages imthype::IJobExecutionLog::GetExecutionEvents ( ExecutionEventType  eventType) const
pure virtual

Get all execution events of a specific type.

Parameters
eventTypeType of events to retrieve
Returns
List of message pointers matching the event type

◆ LogExecutionEvent()

virtual void imthype::IJobExecutionLog::LogExecutionEvent ( ExecutionEventType  eventType,
const QString &  message,
const QDateTime &  timestamp = QDateTime::currentDateTime() 
)
pure virtual

Log an execution event.

Parameters
eventTypeType of execution event
messageEvent description (human-readable)
timestampEvent timestamp

Example usage:

// Job lifecycle
executionLog->LogExecutionEvent(EET_JOB_CREATED,
"Job created with UUID: 12345, Type: ImageProcessing");
executionLog->LogExecutionEvent(EET_JOB_ACCEPTED,
"Job accepted by dispatcher on worker node: worker-01");
executionLog->LogExecutionEvent(EET_JOB_STARTED,
"Job execution started by processor: proc-xyz");
// Status changes
executionLog->LogExecutionEvent(EET_STATUS_CHANGED,
"Status changed from QUEUED to PROCESSING");
executionLog->LogExecutionEvent(EET_PROGRESS_UPDATED,
"Progress updated to 45% - Processing image 45/100");
// Job control
executionLog->LogExecutionEvent(EET_JOB_PAUSED,
"Job paused by user request");
executionLog->LogExecutionEvent(EET_JOB_RESUMED,
"Job resumed after system maintenance");
// Completion
executionLog->LogExecutionEvent(EET_JOB_COMPLETED,
"Job completed successfully in 125.3 seconds");
executionLog->LogExecutionEvent(EET_JOB_FAILED,
"Job failed: Out of memory error during image processing");
executionLog->LogExecutionEvent(EET_JOB_CANCELLED,
"Job cancelled by user at 67% completion");

The message should contain context-specific details like job IDs, worker names, error descriptions, timing info, or progress details that help track the system-level job lifecycle.