Add print saying where the data is stored, add 2 TODOs, and add stuff to Uvicorn

This commit is contained in:
2023-01-23 18:58:16 +01:00
parent 89ddca515c
commit 90f64a968e
2 changed files with 5 additions and 1 deletions

View File

@ -758,9 +758,11 @@ def startup() -> None:
scheduler: BackgroundScheduler = BackgroundScheduler()
# Update all feeds every 15 minutes.
# TODO: Make this configurable.
scheduler.add_job(send_to_discord, "interval", minutes=15, next_run_time=datetime.now())
scheduler.start()
if __name__ == "__main__":
uvicorn.run("main:app", log_level="debug", reload=True)
# TODO: Make this configurable.
uvicorn.run("main:app", log_level="info", host="0.0.0.0", port=5000, proxy_headers=True, forwarded_allow_ips="*")

View File

@ -6,6 +6,8 @@ from reader import Entry, Reader, TagNotFoundError, make_reader # type: ignore
data_dir: str = user_data_dir(appname="discord_rss_bot", appauthor="TheLovinator", roaming=True)
os.makedirs(data_dir, exist_ok=True)
print(f"Data is stored in '{data_dir}'.")
# TODO: Add default things to the database and make the edible.
default_custom_message: str = "{{entry_title}}\n{{entry_link}}"