Skip to content

Commit 15c4be9

Browse files
Merge pull request #259 from RoanKanninga/master
added timesheet to pipeline
2 parents f5faeba + 7342c3d commit 15c4be9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

molgenis-compute-core/src/main/resources/templates/slurm/footer_gaf.ftl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ if [ -d ${MC_tmpFolder:-} ];
88
rm -r $MC_tmpFolder
99
fi
1010

11+
tS=$SECONDS
12+
tM=$((SECONDS / 60 ))
13+
tH=$((SECONDS / 3600))
14+
printf "</#noparse>${taskId}<#noparse>:\t${tS} seconds\t${tM} minutes\t${tH} hours \n" >> Timesheet.txt
1115
trap - EXIT
1216
exit 0
1317
</#noparse>

molgenis-compute-core/src/main/resources/templates/slurm/header_gaf.ftl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ trap "errorExitandCleanUp" HUP INT QUIT TERM EXIT ERR
6161
MOLGENIS_START=$(date +%s)
6262

6363
touch ${taskId}.sh.started
64+
if [ -f Timesheet.txt ]
65+
then
66+
DATE=`date +%Y-%m-%d`
67+
printf "\n\n${DATE}" >> Timesheet.txt
68+
fi
69+
SECONDS=0

0 commit comments

Comments
 (0)