alexbers / mtprotoproxy

Async MTProto proxy for Telegram
MIT License
1.59k stars 351 forks source link

Save user_stats to a file #250

Open SMotlaq opened 3 years ago

SMotlaq commented 3 years ago

Hi, I need to save user_stats to a file and load them at the beginning of the code. So I added a save routine in stats_printer function to save user_stats each config.STATS_PRINT_PERIOD seconds. You can separate this section from stats_printer and make another async function runs each config.STATS_SAVE_PERIOD seconds for example. Thanks.