-
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
ocrd network client processing processor: is non-blocking #1265
Comments
That is ideal for non-interactive clients, however, for interactive clients we could also watch the log file of that specific job till the job fails or succeeds. The same goes for the workflow endpoint. Currently, it is possible to poll workflow status from the processing server. Check an example output:
There were many missing features of the processing server when the client was first implemented. Most of the processing server functionalities are tested by using the endpoints directly. Please have a look at the DHd2024 demo repo. You can find all the bash scripts there for submitting jobs, checking job log files, and checking the workflow status. The |
Really? IMO some
That's effectively a polling paradigm on secondary data. Why not use the callback mechanism directly?
Thanks! |
So how do you imagine the
Well, we could provide both a blocking and non-blocking client?
I am getting confused. Do you ask for a blocking or non-blocking CLI? Of course, you do not need to poll till the job finishes... There is already an implemented user callback mechanism for that, check here and here. In a similar fashion there is an internal callback from the worker to the processing server instead of polling. My idea was rather to get all the logs from the processing job interactively mimicking the old non-network CLI, not because we need that to find out if a job has finished or failed. This said, anything could be implemented on the CLI client side as long as the requirements are clear. |
Yes, we could. I guess I'm saying that blocking is more important and should be default.
Well, how does the user get to know that then, if not through the client CLI?
What I tried to convey is that the client CLI should have an internal server in the background which it can pass as callback URL to the Processing Server to have the callback unblock the CLI. Or some adjustable timeout perhaps.
Retrieving and re-reproducing the logs before exiting is of course an important point. |
When we first discussed the possible client CLI, we kind of agreed to make the typical behaviour of long-running commands blocking (as in the non-network analogue), encapsulating all internal polling or callback mechanics.
But for now the
processor
command is non-blocking – it just prints the job ID.Do we really want that? So far we have no
status
command, and the user would still need to write their own polling loop.The text was updated successfully, but these errors were encountered: