swapper-org / NodeChain

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.
MIT License
7 stars 5 forks source link

Startup Script needs to stop APIs registered with a remote node #148

Closed phoenix-web3 closed 2 years ago

phoenix-web3 commented 2 years ago

Issue

We want to stop APIs associated to a remote node. We also want to show the status of this APIs in the interface

bridgedragon commented 2 years ago

I think it should be possible to stop any API. This approach can be made by 'nodechain.py stop -c "CURRENCY_TO_STOP" -n "NETWORK_TO_STOP". After that, NC should look APIs started with that parameters, and stop them.

This is the most reasonable approach, because only one CURRENCY + NETWORK can be started at the same time, and this key is unique.

The confirmation asking if do you want to stop all APIs, as I think, should be also removed. If you execute that command you are supposed to know what you are doing.

phoenix-web3 commented 2 years ago

I think it should be possible to stop any API. This approach can be made by 'nodechain.py stop -c "CURRENCY_TO_STOP" -n "NETWORK_TO_STOP". After that, NC should look APIs started with that parameters, and stop them.

This is the most reasonable approach, because only one CURRENCY + NETWORK can be started at the same time, and this key is unique.

The confirmation asking if do you want to stop all APIs, as I think, should be also removed. If you execute that command you are supposed to know what you are doing.

It should be possible to stop any API. I'll work on it. In the other hand, there's no confirmation asking if you want to stop all APIs. The only confirmation you'll be asked is if you want to stop the Connector. Saying "yes" you'll be stopping every API

bridgedragon commented 2 years ago

Oh, okay. I did not get it. We should then parametrize it then, to be used in scripts :1st_place_medal: