Skip to content

Commit

Permalink
add timestamps to job info
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Apr 4, 2023
1 parent d26d08c commit d58eac7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ocrd_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ init() {
mkdir -p /run/lock/ocrd.jobs/
{
echo PID=$PID
echo TIME_CREATED=$(date --rfc-3339=seconds)
echo PROCESS_ID=$PROCESS_ID
echo TASK_ID=$TASK_ID
echo PROCESS_DIR=$PROCESS_DIR
Expand All @@ -68,7 +69,8 @@ init() {
}

logret() {
sed -i 1s/.*/RETVAL=$?/ /run/lock/ocrd.jobs/$REMOTEDIR
sed -i "1s/.*/RETVAL=$?/" /run/lock/ocrd.jobs/$REMOTEDIR
sed -i "2a TIME_TERMINATED=$(date --rfc-3339=seconds)" /run/lock/ocrd.jobs/$REMOTEDIR
}

init_task() {
Expand Down

0 comments on commit d58eac7

Please sign in to comment.