diff --git a/pro_wes/ga4gh/wes/workflow_runs.py b/pro_wes/ga4gh/wes/workflow_runs.py index 7356299..894eebc 100644 --- a/pro_wes/ga4gh/wes/workflow_runs.py +++ b/pro_wes/ga4gh/wes/workflow_runs.py @@ -414,7 +414,7 @@ def _create_run_environment( charset=controller_config.id_charset, length=controller_config.id_length, ) - work_dir = Path(controller_config.storage_path).resolve() / run_id + work_dir: Path = Path(controller_config.storage_path).resolve() / run_id # try to create working directory try: @@ -427,7 +427,7 @@ def _create_run_environment( # populate document document.run_log.run_id = run_id document.task_id = uuid() - document.work_dir = str(work_dir) # type: ignore + document.work_dir = work_dir document.attachments = self._process_attachments( work_dir=work_dir, ) diff --git a/pro_wes/tasks/track_run_progress.py b/pro_wes/tasks/track_run_progress.py index a5be859..2d16752 100644 --- a/pro_wes/tasks/track_run_progress.py +++ b/pro_wes/tasks/track_run_progress.py @@ -2,7 +2,7 @@ import logging from time import sleep -from typing import Dict, Optional +from typing import Dict, Optional, Mapping from foca.database.register_mongodb import _create_mongo_client from foca.models.config import Config @@ -98,7 +98,7 @@ def task__track_run_progress( # pylint: disable=too-many-statements response.pop("request", None) document: DbDocument = db_client.upsert_fields_in_root_object( root="run_log", - **dict(response), + **response.dict(), ) # track workflow run progress