File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111import logging
1212
13+ from datetime import datetime
1314from typing import Dict , List , Optional
1415from logging import Logger
1516
@@ -109,7 +110,7 @@ def __init__(self,
109110 self .machine : Machine = machine
110111 self .priority : Optional [int ] = priority
111112 self .launch_dir : Optional [str ] = launch_dir
112- self .start_time : Optional [str ] = start_time
113+ self .start_time : Optional [str ] = str ( datetime . now (). astimezone (). isoformat ()) if not start_time else start_time
113114 self .logger .debug (
114115 f"created { self .type } task { self .name } : runtime => { self .runtime } seconds." )
115116
@@ -160,7 +161,7 @@ def as_dict(self) -> Dict:
160161 if self .machine :
161162 task_obj ['machine' ] = self .machine .name
162163 if self .launch_dir :
163- task_obj ['launch_dir ' ] = self .launch_dir
164+ task_obj ['launchDir ' ] = self .launch_dir
164165 if self .start_time :
165- task_obj ['start_time ' ] = self .start_time
166+ task_obj ['startedAt ' ] = self .start_time
166167 return task_obj
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ def __init__(self,
6060 self .wms_name : Optional [str ] = "WfCommons" if not wms_name else wms_name
6161 self .wms_version : Optional [str ] = str (__version__ ) if not wms_version else wms_version
6262 self .wms_url : Optional [str ] = f"https://docs.wfcommons.org/en/v{ __version__ } /" if not wms_url else wms_url
63- self .executed_at : Optional [str ] = datetime .now ().astimezone ().isoformat () if not executed_at else executed_at
63+ self .executed_at : Optional [str ] = str ( datetime .now ().astimezone ().isoformat () ) if not executed_at else executed_at
6464 self .makespan : Optional [int ] = makespan
6565 self .tasks = {}
6666 self .tasks_parents = {}
You can’t perform that action at this time.
0 commit comments