dmegahan / TwitchStats

Python bot for scraping mutliple Twitch.tv streams and IRCs for stream statistics
Apache License 2.0
1 stars 0 forks source link

Data loss when restarting bots #12

Closed dmegahan closed 9 years ago

dmegahan commented 9 years ago

When a bot is restart, because of updated code that needs to be fixed or because of a crash on one of the threads, the way data is stored doesn't allow for a continuation of the previous session, and just starts a need one with a new file and timestamp/name. There needs to be a way to continue the previous session, based on file modified times? or an algorithm that reads the last time data was received in the last file, and uses that instead of creating a new file if they are close.

dmegahan commented 9 years ago

Fixed. Bots will try to use the same file if the user is online and the file had been modified within a certain number of minutes, that can be set by the user in the configs.