-
Notifications
You must be signed in to change notification settings - Fork 133
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
Make ControlServices comply with autostart server settings #705
Conversation
- do not start the service(s) if their respective autostart setting is set to false, a regression probably existing since Dicoogle 3.0.0 - remove unused variable `webServicesRunning` in ControlServices - remove use of raw types in startStorage() - remove outdated TODO note - refactor ControlServices#startStorage() to return and raise exception - adjust ServicesServlet according to changes to ControlServices and to be more informative
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.
Autostart is now being respected, and I've confirmed this with a local run.
I've confirmed that ControlServices#startStorage()
behaves as suggested in the PR.
I did find an issue with ServicesServlet
: though I'm not sure that this was present before, I noticed that GET /management/plugins/
returns the following response body:
{
"isRunning": false,
"port": -1,
"autostart": false
}
Please confirm if this is expected. Otherwise, the PR is good and I can approve.
Personally, I would expect this endpoint to list the available plugins.
That is a curious finding. That endpoint is not part of the API, but it was probably captured by the service status servlet anyway, which tried to fetch the status of a service which does not exist. This can be improved, but it is hardly problematic, nor does it not look like a regression from this PR. |
For clarity's sake, I only found and tested that endpoint because I went into the code to see what endpoints that servlet was mapped to, and that one was included. I have created a new issue to track this, though of course it is of low priority. With nothing else to add, I'll be approving this PR. |
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.
Since the servlet plugin endpoint is not currently intended for use, I'll be approving this PR. Looks good!
webServicesRunning
inControlServices
startStorage()
ControlServices#startStorage()
to return whether the service started (true
) or was already running (false
) and raise an exception on errorServicesServlet
according to changes toControlServices
, and for the output to be more precise and informative