colorstackatuw / ColorStack-Discord-Bot

Discord bot created by ColorStack at UW-Madison to track and post internship opportunities within your Discord
https://colorstack.cs.wisc.edu
MIT License
7 stars 3 forks source link

Docker Cache system for missed dates #4

Closed DavidSalazar123 closed 9 months ago

DavidSalazar123 commented 9 months ago

Is your feature request related to a problem? Please describe.

None

Describe the solution you'd like

The solution that I would like is if the docker container crashes due to a bug within the code, we need to re-run the GitHub scraper for the missing dates. An example would be if the docker container shuts down on 2/2 and the bot is back up 2/5, we need to scrape for jobs between 2/3 - 2/4.

Describe alternatives you've considered

There are two possible solutions:

  1. Before the bot shuts down, we can save the current date within a .json file. Once the bot comes back up, we use the GitHub scraper to get the dates between the last shut down to today
  2. It may be possible to use a regex to collect the data but unsure

Additional context

Make sure to check out GitHubUtilities and InternshipUtilities classes to see how the GitHub scraper runs with DiscordBot being the main run file to work

DavidSalazar123 commented 9 months ago

Resolved the issue using the getCommitChanges and adding volumes to docker-compose