Skip to content

Commit e58f59c

Browse files
committed
Added a TG notification on the service startup
1 parent b9d7362 commit e58f59c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
InterruptHandler,
2929
check_default_account_balance,
3030
wait_prysm_ready,
31+
telegram,
3132
)
3233

3334
# Send notification to admins on error
@@ -63,6 +64,16 @@ def main() -> None:
6364
# wait for interrupt
6465
interrupt_handler = InterruptHandler()
6566

67+
# Notify Telegram the oracle is warming up, so that
68+
# oracle maintainers know the service has restarted
69+
telegram.notify(
70+
message=f"Oracle starting with account [{web3_client.eth.defaultAccount}]"
71+
f"(https://etherscan.io/address/{web3_client.eth.defaultAccount})",
72+
parse_mode="markdown",
73+
raise_on_errors=True,
74+
disable_web_page_preview=True,
75+
)
76+
6677
# wait that node is synced before trying to do anything
6778
wait_prysm_ready(
6879
interrupt_handler, BEACON_CHAIN_RPC_ENDPOINT, PROCESS_INTERVAL, logger

0 commit comments

Comments
 (0)