But more importantly, we should also communicate the exit value (of the Manager script, including ocrd process command, resynchronization, ocrd workspace validate command etc).
To differentiate between "total" and "partial" failures, and at what stage, we still need the last lines of the log (persisted job-locally under $WORKDIR/ocrd.log), though.
To achieve that, we could:
amend logexit and close by persisting $? into (say) $WORKDIR/ocrd.ret
evaluate that file in the Monitor in case the process has already terminated
We currently only show the termination status by looking at the PID on the Controller (which is communicated via a file
$WORKDIR/ocrd.pid
): https://github.com/markusweigelt/ocrd_manager/blob/daed8299411dfb4f3476c5d8ea602ab9ac20c3a4/ocrd_monitor/serve.py#L182-L184But more importantly, we should also communicate the exit value (of the Manager script, including
ocrd process
command, resynchronization,ocrd workspace validate
command etc).To differentiate between "total" and "partial" failures, and at what stage, we still need the last lines of the log (persisted job-locally under
$WORKDIR/ocrd.log
), though.To achieve that, we could:
logexit
andclose
by persisting$?
into (say)$WORKDIR/ocrd.ret