mantiserve.tasks.util module¶
This module provides facilities for utility operations that could be shared during the setup of tasks.
- mantiserve.tasks.util.cleanup_task_with_failure(session: mate_query.db.Session, exc: Exception, task_id: str) None ¶
Take care of transitioning the task to failure with information according to
exc
and commit to DB.- Parameters
session (mate_query.db.Session) –
exc (Exception) –
task_id (str) –
- Return type
None
- mantiserve.tasks.util.mantiserve_workspace_path(task_id: str) pathlib.Path ¶
Returns a directory for persisting Mantiserve artifacts related to the
task_id
.- Parameters
task_id (str) –
- Return type
pathlib.Path