blitz_api/app/models
fusion44 493d8039fa
refactor: improve startup procedure
During startup the API will try to connect to Bitcoin Core and the
Lightning Node. If it can't connect it will check every "n" seconds
(currently 2s) and connect when available. A new SSE event
called "system_startup_info" is introduced. This event contains
all startup status information during the startup procedure.

The old wallet_locked event is obsolete.

Sample:
--------------------------
event: system_startup_info
data: {"bitcoin": "offline", "bitcoin_msg": "", "lightning": "offline", "lightning_msg": "Unable to connect to LND daemon, waiting..."}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "offline", "lightning_msg": "Unable to connect to LND daemon, waiting..."}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "locked", "lightning_msg": "Wallet locked, unlock it to enable full RPC access"}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "done", "lightning_msg": ""}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "bootstraping", "lightning_msg": "RPC not yet available"}
--------------------------

refs #97
2022-06-06 19:29:21 +02:00
..
__init__.py feat: implement /lightning/list-all-tx endpoint 2021-11-02 19:02:08 +01:00
api.py refactor: improve startup procedure 2022-06-06 19:29:21 +02:00
bitcoind.py chores: remove unused health messages; Fix typos 2022-06-04 14:46:03 +02:00
lightning.py refactor: improve startup procedure 2022-06-06 19:29:21 +02:00
lightning_docs.py chore: format source using the pre_commit command 2022-03-20 17:20:56 +01:00
system.py chores: remove unused health messages; Fix typos 2022-06-04 14:46:03 +02:00