_aux_functions_history
| FUNCTION | DESCRIPTION |
|---|---|
get_history_run_or_404 |
Get an existing HistoryRun or raise a 404. |
get_history_unit_or_404 |
Get an existing HistoryUnit or raise a 404. |
get_wftask_check_access |
Verify user access for the history of this dataset and workflowtask. |
read_log_file |
Returns the contents of a Job's log file, either directly from the working |
Classes
Functions:
_verify_workflow_and_dataset_access(*, project_id, workflow_id, dataset_id, user_id, required_permissions, db)
async
Verify user access to a dataset/workflow pair.
| PARAMETER | DESCRIPTION |
|---|---|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
Source code in fractal_server/app/routes/api/v2/_aux_functions_history.py
get_history_run_or_404(*, history_run_id, db)
async
Get an existing HistoryRun or raise a 404.
| PARAMETER | DESCRIPTION |
|---|---|
|
TYPE:
|
|
TYPE:
|
Source code in fractal_server/app/routes/api/v2/_aux_functions_history.py
get_history_unit_or_404(*, history_unit_id, db)
async
Get an existing HistoryUnit or raise a 404.
| PARAMETER | DESCRIPTION |
|---|---|
|
The
TYPE:
|
|
An asynchronous db session
TYPE:
|
Source code in fractal_server/app/routes/api/v2/_aux_functions_history.py
get_wftask_check_access(*, project_id, dataset_id, workflowtask_id, user_id, required_permissions, db)
async
Verify user access for the history of this dataset and workflowtask.
| PARAMETER | DESCRIPTION |
|---|---|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
Source code in fractal_server/app/routes/api/v2/_aux_functions_history.py
read_log_file(*, task_name, dataset_id, logfile, job_working_dir, job_status)
Returns the contents of a Job's log file, either directly from the working directory or from the corresponding ZIP archive.
The function first checks if logfile exists on disk.
If not, it checks if the Job working directory has been zipped and tries to
read logfile from within the archive.
(Note: it is assumed that logfile is relative to job_working_dir)