Skip to content

Commit

Permalink
fix serialization error
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Oct 28, 2024
1 parent 1b1a5fb commit 8c3c036
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions nmdc_automation/import_automation/activity_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
import logging
import datetime
import pytz
import json
import yaml

from typing import List, Dict, Union, Tuple
from nmdc_schema import nmdc


from linkml_runtime.dumpers import json_dumper
from nmdc_automation.api import NmdcRuntimeApi
from nmdc_automation.models.nmdc import DataObject, workflow_process_factory
from .utils import object_action, file_link, get_md5, filter_import_by_type
Expand Down
4 changes: 3 additions & 1 deletion nmdc_automation/workflow_automation/watch_nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from json import loads
from pathlib import Path
from typing import List, Dict, Any, Optional, Union, Tuple
from linkml_runtime.dumpers import yaml_dumper
import yaml

from nmdc_schema.nmdc import Database
from nmdc_automation.api import NmdcRuntimeApi
Expand Down Expand Up @@ -286,7 +288,7 @@ def cycle(self):
successful_jobs, failed_jobs = self.job_manager.get_finished_jobs()
for job in successful_jobs:
job_database = self.job_manager.process_successful_job(job)
job_dict = json.loads(job_database.json(exclude_unset=True))
job_dict = yaml.safe_load(yaml_dumper.dumps(job_database))

# post workflow execution and data objects to the runtime api
resp = self.runtime_api_handler.post_objects(job_dict)
Expand Down

0 comments on commit 8c3c036

Please sign in to comment.