Open vorpal-buildbot opened 4 years ago
mtgbot could count the number of members in the guild every hour or whatever, or just plug into on_member_join and on_member_remove to keep a running count. Then we could provide a weekly pinned message PDBot style, or a page in logs or pdm with a nice graph.
@silasary are mtgbot and the sites (logs, prdm) supposed to be able to access the same Redis?
@jgabrielygalan Reading redis_wrapper.py's init function I'd say they do if the config.json points to the same place.
And checking prod all the redis config values are the same in logsite and decksite.
So yes, but it's maybe more fragile than you would wish.
The discord bot uses a different database than the other two, and it should be safe to store things in relatively long-term. I wouldn't use it as the only storage for anything important though.
This information is not really important. The bot can check every period of time (hour, half day,day or so) and store an entry in a Redis rollin list (BRPOPLPUSH) with the current member count. The list will be as wide as we want to go back in time, like, I don't know a 1000 element list to go back 3 years for daily counts, or 1.5 years back of half day counts. Then I was thinking this list could be used to draw a graph in one of the websites. Hence I was asking if one of the sites could read from the same place the bot is writing.
If we don't want to use a database linking the two systems we could have the bot call an api and have pdm be the only one managing this data in Redis.
Reported on Discord by jgabrielygalan#7654