Skip to content

Commit

Permalink
set ended_at_time from end in job metadata and update state
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Dec 3, 2024
1 parent 23d84b5 commit 0a6ea07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nmdc_automation/workflow_automation/watch_nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def process_successful_job(self, job: WorkflowJob) -> Database:
logger.info(f"Created workflow execution record for job {job.opid}")

job.done = True
job.workflow.state["end"] = workflow_execution.ended_at_time
self.file_handler.write_metadata_if_not_exists(job)
self.save_checkpoint()
return database
Expand Down
1 change: 1 addition & 0 deletions nmdc_automation/workflow_automation/wfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ def make_workflow_execution(self, data_objects: List[DataObject]) -> WorkflowExe
"""
wf_dict = self.as_workflow_execution_dict
wf_dict["has_output"] = [dobj.id for dobj in data_objects]
wf_dict["ended_at_time"] = self.job.metadata.get("end")

# workflow-specific keys
logical_names = set()
Expand Down

0 comments on commit 0a6ea07

Please sign in to comment.