-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When things are running, sometimes we may need to:
- restart the server if it misbehaving
- kill it if it is not necessary.
- control startup sequence
Currently, the user has to bother about scheduling, starting and stopping a Thing's python script on their own. They may also install the python script as a system service to automatically run the Thing at startup. To kill, they have to close the system service or restart it by using service restart commands.
It would be nice to have a tested tool suggested to them which will do exactly this but can show all the Thing's running on the computer.
A REST API to do this would be very helpful. It should have the following endpoints:
- To specify a script where a
Thing
has been defined, and CLI options to start that script with a specified startup level. For example, lets say there are 3 levels of startup. Scripts in level 1 start first, followed by 2 & 3. It should be possible to define arbitrary number of levels. - list all the controlled things on that PC/machine
- stop server (including SIGKILL if not responding)
- restart server
- add level/delete level of startup
- offer global levels of starting where a script in computer 1 is started before script in computer 2
- delete a controlled thing from startup sequencing
- group kill and start
- thing metadata endpoint (not clear yet what should be included)
It should be in python, with fast API with a controller, models & routes (please if using controllers, models and repository pattern, one layer less would be preferred). Models should be in pydantic and database should be sqlalchemy. There should an open API specification.
Unit tests can be added if necessary or can be skipped in the first attempt.
We can setup a project transfer to the org once its ready.