nv_dfm_core.session.Job#
- class nv_dfm_core.session.Job(homesite, job_id, pipeline=None, next_frame=None, was_found=True, callback_runner=None)[source]#
A Job object is returned by Session.execute() and provides a way to interact with the running job.
Depending on the type of execution, different Job implementations are used.
Note: Data callbacks are registered directly within Session.execute() because we want to make sure that no messages get lost. Currently it’s not supported to register callbacks later on.
- Parameters:
homesite (str)
job_id (str)
pipeline (PreparedPipeline | None)
next_frame (Frame | None)
was_found (bool)
callback_runner (CallbackRunner | None)
- property callback_runner: CallbackRunner | None#
Access the callback runner for manual dispatch control.
When using ManualDispatcher, call job.callback_runner.process_pending() from your desired thread to process pending callbacks.
- Returns:
The callback runner, or None if no callbacks were registered.
- abstractmethod detach()[source]#
Detach from the job, stopping result polling and releasing callbacks.
After calling detach(), this Job object becomes inert and should not be used. The job execution continues, but results will not be delivered until reattachment with session.reattach().
This allows the Job object to be garbage collected while the job continues running.
This is idempotent - calling detach() multiple times is safe.
- Return type:
None
- send_input_params(input_params)[source]#
Sends more frames for the given input parameter sets, if the pipeline hasn’t been stopped yet.
- Parameters:
input_params (dict[str, Any] | list[dict[str, Any]])
- property was_found: bool#
Whether this Job object is attached to a known/real job.
For execute(), this is always True. For reattach(), this may be False if the job_id was not recognized by the target.