Open bertsky opened 10 months ago
dummy-on-timeout.sh
:
processor=$1; shift;
timeout 60 $processor $@ || ocrd-dummy $@
And then
make PROCESSOR=dummy-on-timeout.sh
Like this?
More like:
parallel: $(WS_PAR)/mets.xml
cd $(WS_PAR) ; \
ocrd workspace list-page | parallel -j $(NUMBER_OF_THREADS) "timeout $(PAGE_TIMEOUT) $(PROCESSOR) -U $(SOCK) -I DEFAULT -O VANDALIZED -g {} || $(ECHO) ocrd-dummy -U $(SOCK) -I DEFAULT -O VANDALIZED -g {}"
Reopening because we want this in core
In the parallel case, we could rewrite the background process command as a sequence, falling back to some ocrd-dummy (for the same page range) if the actual processor fails (or times out).