-
Notifications
You must be signed in to change notification settings - Fork 32
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
REST API wrapper for the processor #884
Conversation
…s started from bash or Python.
…t group check after the execution.
path: str | ||
description: Optional[str] = None | ||
input_file_grps: List[str] | ||
output_file_grps: Optional[List[str]] |
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.
Why is output_file_grp
optional but input_file_grps
is not?
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.
Is there a case when a processor can run without input file groups?
# Conflicts: # ocrd/ocrd/processor/base.py
…ests accordingly.
Hi, I am/was not able to call a processing server running for ocrd-olena-binarize (a bashlib processor). I think it is because of a bug in the processing server in helpers.py in function |
@joschrew thank you for your comment. I pushed the fix as you suggested. |
Description
This pull request provides the REST API wrapper for the processor. Instead of "one-shot mode", the processor now can be started as a server. There are 2 ways to start the processor:
1. Use processor name. This is the recommended way to start the Pythonic processor as a server.
2. Use
ocrd
tool. This approach is for non-Python processor.Options
processor-name
: executable name of the processor--address
: it has 3 parts, separated by colon,IP:PORT:MONGO_URL
, whereIP
: the IP address that the server should listen on.PORT
: the port that the server should listen on.MONGO_URL
: the full connection string to a running Mongo database instance.