edgebox-iot / edgebox-iot/edgeboxctl
[FEATURE] Implementing task: Restart edgeboxctl
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Supporting a task to mark a restart of edgeboxctl.
Expected behaviour:
- A new task ´taskRestartEdgeboxctl´ is supported in the codebase.
- Behaves like any other task such as `taskStartEdgeapp`, so it can be called from the dashboard interface or endpoints of `edgebox-iot/api`
- Since terminating the program will not allow it to save state on the database, On edgeboxctl's 1st valid work tick, which is supposedly after a restart, the system should fetch the latest restart task with status `executing` (1) issued in the last minute, and mark it as `finished` (2).
- If no restart task is found on the DB within that time span, it means that the program might have crashed and restarted by itself, or has been manually restarted. In this case, a Task entry should be created on the database with `restart_edgeboxctl`, but the status should be set to `error` (3).
EDIT: We can potentially also implement `taskRestartEdgebox`, which can issue a full system restart. The 1st work tick can then also search for a Task entry `restart_edgebox` (maybe use a more extended grace period for the find query), and finish updating its status.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.