File tree Expand file tree Collapse file tree
src/workflows/run_benchmark Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727* Updated ` README.md ` (PR #5 ).
2828
29+ * ` run_benchmark ` : write the commit the workflow ran from and the launch time into
30+ ` task_info.yaml ` , instead of publishing ` _viash.yaml ` verbatim (PR #18 ).
31+
2932## BUGFIXES
3033
Original file line number Diff line number Diff line change @@ -164,14 +164,23 @@ workflow run_wf {
164164 metric_configs_file. write(metric_configs_yaml_blob)
165165
166166 // store the task info in a file
167- def viash_file = meta. resources_dir. resolve(" _viash.yaml" )
167+ def task_info = readYaml(meta. resources_dir. resolve(" _viash.yaml" ))
168+ // commitId is null when nextflow runs from a local checkout instead of a revision
169+ if (workflow. commitId) {
170+ task_info. commit = workflow. commitId
171+ }
172+ // the launch time -- workflow.complete is only known once the run is over
173+ task_info. timestamp = workflow. start. toInstant()
174+ .truncatedTo(java.time.temporal.ChronoUnit . SECONDS ). toString()
175+ def task_info_file = tempFile(" task_info.yaml" )
176+ task_info_file. write(toYamlBlob(task_info))
168177
169178 // create output state
170179 def new_state = [
171180 output_dataset_info : dataset_uns_file,
172181 output_method_configs : method_configs_file,
173182 output_metric_configs : metric_configs_file,
174- output_task_info : viash_file ,
183+ output_task_info : task_info_file ,
175184 _meta : states[0 ]. _meta
176185 ]
177186
You can’t perform that action at this time.
0 commit comments