Skip to content
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

Improved service management #1192

Merged
merged 3 commits into from
May 3, 2024
Merged

Conversation

derneuere
Copy link
Member

@derneuere derneuere commented Apr 6, 2024

This pull request addresses #1124.
The services now get started with Django and there is a cron job, which checks if the service is still running.

There are now a bunch of new endpoints:

[GET] /services/: List all services
[GET] /services/<service_name>/: Retrieve the health status of a service
[POST] /services/<service_name>/start/: Start a service
[POST] /services/<service_name>/stop/: Stop a service

Current limitations:
All stopped jobs, would start again on the reboot of the container as they are currently not persisted.
Maybe the implementation is a bit naive, I just start the process as sub processes and the keep in them in a list, if I want to terminate them.

Needs to be merged with: LibrePhotos/librephotos-docker#122

@derneuere derneuere marked this pull request as draft April 6, 2024 13:04
Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@derneuere derneuere marked this pull request as ready for review April 25, 2024 18:28
@derneuere derneuere requested a review from sickelap April 25, 2024 18:32
@derneuere derneuere merged commit e778712 into dev May 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant