-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: node registry refresh searches for pids
The node registry refresh is changed to determine if each service process is running by searching for processes that have a binary running at a particular path. Since each node service has its own copy of the binary, it is uniquely identified by the location of that binary. The refresh is split into partial or full. In the partial case, we will only attempt to find the PID by searching for a process by its binary path. If it is found, we set the new PID for the service and set its status to `RUNNING`; if it's not found, we set the status to `STOPPED`. This mechanism should be robust against user interference, e.g., if they manually start/stop processes by whatever means. For a full refresh, we also connect to the node's RPC service to get information about connected peers and listeners. We will use partial refresh for commands like `start` and `stop`, to help us determine whether we should attempt to start/stop services that were already running or not. These commands will potentially operate over lots of services so we will avoid the RPC connections here. Full refresh will be used when the `status` command runs. Finally, I have also reassigned the connected peers data, and added/updated some of the log information which I found useful to have during my testing.
- Loading branch information
Showing
13 changed files
with
263 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.