mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
stats: include shard count in shm name
This commit is contained in:
parent
7c353e797b
commit
fc6e32a691
1 changed files with 6 additions and 1 deletions
|
@ -34,7 +34,12 @@ class Stats(BotBinStats):
|
|||
|
||||
# Use our user ID as part of the shm name
|
||||
# to allow running multiple instances of the bot on the same machine.
|
||||
shm_name = f'emote-manager-{self.bot.user_id}'
|
||||
# The shard count is incorporated to prevent the following situation:
|
||||
# - Shard count is increased in the launcher script / unit file from 30 to 33
|
||||
# - All clusters are restarted
|
||||
# - Clusters begin using the old 30-element-long list to store their shard counts,
|
||||
# but because some clusters that haven't restarted yet are still using the old shlist.
|
||||
shm_name = f'emote-manager-{self.bot.user_id}-{self.bot.shard_count}'
|
||||
if self.is_opener():
|
||||
seq = [0] * self.bot.shard_count
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue