ruz-bot/entrypoint.py
Administrator 5b76f3528c api
2022-10-22 13:06:59 +03:00

24 lines
459 B
Python

import sys
from daemons.api import api
from daemons.bot import bot
from daemons.fetch import fetch
from daemons.notify import notify
arg = sys.argv[-1]
if arg == "bot":
print("bot is starting")
bot.polling()
elif arg == "fetch":
print("fetch is starting")
fetch()
elif arg == "notify":
print("notify is starting")
notify()
elif arg == "api":
print("api is starting")
api()
else:
raise ValueError(f"Unknown param {arg}")