diff --git a/setup-scripts/funds-checker.py b/setup-scripts/funds-checker.py index 4608352d..2f840538 100755 --- a/setup-scripts/funds-checker.py +++ b/setup-scripts/funds-checker.py @@ -5,15 +5,21 @@ health-checker runs simple health checks on a portal node using the siad API and dispatches messages to a Discord channel. """ -import discord, traceback +import discord, traceback, asyncio from bot_utils import setup, send_msg, siad, sc_precision bot_token = setup() client = discord.Client() +async def exit_after(delay): + await asyncio.sleep(delay) + exit(0) + + @client.event async def on_ready(): await run_checks() + asyncio.create_task(exit_after(10)) await client.close()