SaxyPandaBear / food-pics

Scheduled webhook that scrapes Reddit and posts to Discord
MIT License
0 stars 0 forks source link

Refactor webhook URL usage to be more scalable #9

Open SaxyPandaBear opened 2 years ago

SaxyPandaBear commented 2 years ago

As of right now, how the food webhook works is it pulls a single webhook URL from the environment variable. This should be rewritten to be able to handle an arbitrary number of webhook URLs, though this is not meant to target other webhook destinations, just the ability to push to multiple discord webhooks simultaneously.

Proposition is to use a Postgres db (I believe 10k rows is free with heroku postgres) to store webhook urls.

SaxyPandaBear commented 2 years ago

Alternative is to load a json string into the env var. Using a Postgres db is definitely overkill and adds a lot of latency to any webhook for the db connection