7.10. Clara Pipeline Driver Callbacks
Provided by application code to the driver when calling clara.Driver constructor, and called by the driver once driver initialization has completed. Application code is expected to perform any preparation or setup steps necessary when this function is called.
Providing a preparation callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from initialization to waiting for inputs for execution.
Parameters
driver
type:
clara.DriverReference to the Clara Pipeline Driver instance which is calling this method.
Return
Returns True if successful; otherwise a False value.
see also: Clara Pipeline Driver
lambda driver: True
Provided by application code to the driver when calling clara.Driver constructor, and called by the driver once inputs are ready for consumption. Application code will be provided a clara.Payload pointer which can be used to obtain information about the payload.
Providing an execution callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from waiting for inputs to clean-up.
see also: Clara Pipeline Driver
Parameters
driver
type:
clara.DriverReference to the Clara Pipeline Driver instance which is calling this method.
payload
type:
clara.PayloadReference to the current stage’s payload.
Return
Returns True if successful; otherwise a False value.
lambda driver, payload: True
Provided by application code to the driver when calling clara.Driver constructor, and called by the driver after execution is complete and internal driver clean up has completed. The application is expected to perform any clean or finalization steps during this callback event.
Providing a clean-up callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from clean-up to internal finalization.
see also: Clara Pipeline Driver
Parameters
driver
type:
clara.DriverReference to the Clara Pipeline Driver instance which is calling this method.
Return
Returns True if successful; otherwise a False value.
lambda driver: True
Provided by application code to the driver when calling clara.Driver constructor, and called by the driver when any noteworthy event happens. This includes internal errors.
Providing a notification callback handler to the driver is optional. When no callback handler is provided, the driver will be unable to notify application code of any internal errors or critical state changes.
see also: Clara Pipeline Driver
Parameters
driver
type:
clara.DriverReference to the Clara Pipeline Driver instance which is calling this method.
result
type:
intThe result, or return code, of the event calling this method.
message
type:
stringThe detailed information about the event causing the notification event.
is_fatal
type:
boolTruewhen the event generating the notification is fatal; otherwiseFalse.
Return
lambda driver, result, message, is_fatal: None