dsychin / RedditBruneiNewsBot

This repository includes the code for the brunei_news_bot reddit account which monitors a list of subreddit for new post with links to news articles and automatically scrape the website for the content and post it as a reply.
MIT License
2 stars 1 forks source link

Use proper background job management #21

Open dsychin opened 3 years ago

dsychin commented 3 years ago

There are some cases where loading the web page failed, possibly due to rate limiting by cloudflare, and the post not having a reply due to an exception. In order to prevent this from happening in the future, there should be a proper job management which will automatically retry.

Using Hangfire will also make it easier to monitor successful/failed jobs via the web interface.

dsychin commented 3 years ago

The issue where the web page occasionally failed to load was fixed with #22 but it should still be a good idea to migrate over to hangfire for better future proofing.

dsychin commented 3 years ago

.NET Worker Service template might be a more suitable and lighter weight alternative to hangfire.