Skip to content

Commit

Permalink
add trace to exception hendling in process successful job
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Nov 18, 2024
1 parent c625a83 commit d60fd21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nmdc_automation/workflow_automation/watch_nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import linkml.validator
import importlib.resources
from functools import lru_cache
import traceback

from nmdc_schema.nmdc import Database
from nmdc_automation.api import NmdcRuntimeApi
Expand Down Expand Up @@ -229,8 +230,9 @@ def process_successful_job(self, job: WorkflowJob) -> Database:
try:
workflow_execution = job.make_workflow_execution(data_objects)
except Exception as e:
# job_dict = yaml.safe_load(yaml_dumper.dumps(job))
logger.error(f"Error creating workflow execution record: {e} for job {job.opid}")
trace = traceback.format_exc()
logger.error(f"Error creating workflow execution: {e} for job {job.opid}")
logger.error(trace)
# exit early if there is an error
sys.exit(1)
database.workflow_execution_set = [workflow_execution]
Expand Down

0 comments on commit d60fd21

Please sign in to comment.