-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send ocr processing messages to active mq #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
I see a couple of points that still need to be addressed:
- the ERR trap currently only logs locally, but should now also be used to signal via MQ; I suggest adding a line to
logerr
which useskitodo_production_task_action_error_open
with a suitable custom message (involving$BASH_COMMAND
and/or$(caller)
to be as concrete as possible) - in case the Kitodo side does not have the right version installed, shouldn't we fall back to the old
KitodoProduction.FinalizeStep.Queue
interface? - we must make sure that if no Kitodo is configured, then also
ACTIVEMQ
stays empty. Currently it will read:
and fail. So either catch that specifically, or avoid just setting$MQ_HOST:$MQ_PORT
in docker-compose.yml
For Kitodo I suggest to prevent detailed messages. I think the user should only be informed that a problem occurs and get more information in the monitor to fix the problem.
Currently, I am not sure how we can find out. Do we provide another enviroment variable with which to pass the version of Kitodo? Or do we expect the Kitodo version as a parameter to the Kitodo script. Alternatively maybe a flag but we can not introduce flags for every case.
Good point i will change this. |
Yes, the details are already in the OCRD logs that can be viewed in the Monitor. We could also just use your default message – but we must add the signal.
IIRC there are a couple of variables available from Kitodo scripts – if the version is among them, that would be the cleanest solution. (We already have an
In the simplest case, just add another |
Changed the implemenation with your hints from review. Now you can configure the queue over env variable and if no variable is set the default queue is used and only |
Co-authored-by: Robert Sachunsky <[email protected]>
Co-authored-by: Robert Sachunsky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx!
ocrd_lib.sh
OPEN
state toINWORK
(Depends on this Kitodo.Production extension for task action messages.)