omnipy.shared.protocols.engine.job_runner
Protocols for engines that decorate runnable jobs.
| CLASS | DESCRIPTION |
|---|---|
IsJobRunnerEngine |
|
IsJobRunnerEngine
Bases: IsEngine, Protocol
flowchart BT
omnipy.shared.protocols.engine.job_runner.IsJobRunnerEngine[IsJobRunnerEngine]
omnipy.shared.protocols.engine.base.IsEngine[IsEngine]
omnipy.shared.protocols.engine.base.IsEngine --> omnipy.shared.protocols.engine.job_runner.IsJobRunnerEngine
click omnipy.shared.protocols.engine.job_runner.IsJobRunnerEngine href "" "omnipy.shared.protocols.engine.job_runner.IsJobRunnerEngine"
click omnipy.shared.protocols.engine.base.IsEngine href "" "omnipy.shared.protocols.engine.base.IsEngine"
| METHOD | DESCRIPTION |
|---|---|
__init__ |
|
apply_job_decorator |
Attach the engine's execution decorator to a job callback endpoint. |
get_config_cls |
Return the config class associated with this engine type. |
set_config |
Replace the active config and refresh config-dependent state. |
set_registry |
Attach or clear the run-state registry used for job state reporting. |
supports |
Return whether the engine can initialize and run |
| ATTRIBUTE | DESCRIPTION |
|---|---|
config |
Return the currently active engine configuration.
TYPE:
|
registry |
Return the registry currently used for run-state reporting.
TYPE:
|
supported_job_types |
|
Source code in src/omnipy/shared/protocols/engine/job_runner.py
config
property
config: IsJobRunnerConfig
Return the currently active engine configuration.
| RETURNS | DESCRIPTION |
|---|---|
IsJobRunnerConfig
|
Active configuration object controlling engine behavior.
TYPE:
|
registry
property
registry: IsRunStateRegistry | None
Return the registry currently used for run-state reporting.
| RETURNS | DESCRIPTION |
|---|---|
IsRunStateRegistry | None
|
IsRunStateRegistry | None: Registry receiving job-state updates, or |
__init__
apply_job_decorator
apply_job_decorator(
job_type: JobType.Literals, job: IsFuncArgJob, job_callback_accept_decorator: Callable
) -> None
Attach the engine's execution decorator to a job callback endpoint.
| PARAMETER | DESCRIPTION |
|---|---|
job_type
|
Job category selecting the run behavior. |
job
|
Job instance being prepared for execution.
TYPE:
|
job_callback_accept_decorator
|
Consumer that accepts the engine-provided decorator.
TYPE:
|
Source code in src/omnipy/shared/protocols/engine/job_runner.py
get_config_cls
classmethod
get_config_cls() -> Type[IsJobRunnerConfig]
Return the config class associated with this engine type.
| PARAMETER | DESCRIPTION |
|---|---|
cls
|
Engine subclass whose configuration class is being requested.
|
| RETURNS | DESCRIPTION |
|---|---|
Type[IsJobRunnerConfig]
|
Type[IsJobRunnerConfig]: Configuration class used to instantiate engine settings. |
Source code in src/omnipy/shared/protocols/engine/base.py
set_config
set_config(config: IsJobRunnerConfig) -> None
Replace the active config and refresh config-dependent state.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Runtime configuration object for the engine.
TYPE:
|
Source code in src/omnipy/shared/protocols/engine/base.py
set_registry
set_registry(registry: IsRunStateRegistry | None) -> None
Attach or clear the run-state registry used for job state reporting.
| PARAMETER | DESCRIPTION |
|---|---|
registry
|
Registry implementation, or
TYPE:
|
Source code in src/omnipy/shared/protocols/engine/base.py
supports
Return whether the engine can initialize and run job_type jobs.
| PARAMETER | DESCRIPTION |
|---|---|
job_type
|
Job category to test. |
| RETURNS | DESCRIPTION |
|---|---|
bool
|
TYPE:
|