poiesis.core.services.texam package¶
Submodules¶
poiesis.core.services.texam.texam module¶
TExAM (Task Executor and Monitor) service.
- class poiesis.core.services.texam.texam.Texam(task)[source]¶
Bases:
objectTExAM service.
- Parameters:
task (
TesTask) – TesTask object.
- task¶
TesTask object.
- task_id¶
Task ID.
- kubernetes_client¶
Kubernetes client.
- message_broker¶
Message broker.
- failed¶
Flag defining if TE failed.
- db¶
MongoDB client.
- _mounts_cache¶
Cache for volume mounts.
- async create_executor_job(executor, idx)[source]¶
Create a k8s Job for the executor.
- Parameters:
executor (
TesExecutor) – Executor object.idx (
int) – Index of the executor.
- Return type:
bool- Returns:
True if job was created successfully, False otherwise.
- async execute()[source]¶
Execute TExAM.
Creates individual k8s Jobs for each executor sequentially. If any executor fails, remaining executors are marked as failed.
- Return type:
None
- async monitor_executor_job(executor, idx)[source]¶
Monitor the executor job and log details in TaskDB.
- Parameters:
executor (
TesExecutor) – Executor object.idx (
int) – Index of the executor.
- Return type:
bool- Returns:
True if executor completed successfully, False otherwise.
- async run_single_executor(executor, idx)[source]¶
Run a single executor and monitor it to completion.
- Parameters:
executor (
TesExecutor) – Executor object.idx (
int) – Index of the executor.
- Return type:
bool- Returns:
True if executor completed successfully, False otherwise.
Module contents¶
Task executor and monitor service.