Fix for callers, and auto-clear them if there's no inactivity for 60 minutes

This commit is contained in:
2021-09-13 14:28:53 +02:00
parent 04f96684cf
commit 5acfb6866a
5 changed files with 87 additions and 54 deletions
+2 -2
View File
@@ -91,8 +91,8 @@ class LeaderController:
return self.set_raid_leader(request.sender, char)
@timerevent(budatime="1h", description="Remove raid leader if raid leader hasn't been active for more than 1 hour")
def leader_auto_remove(self, _1, _2):
@timerevent(budatime="15m", description="Remove raid leader if raid leader hasn't been active for more than 1 hour")
def purge_leader_on_inactivity(self, _1, _2):
if self.last_activity:
if self.last_activity - int(time.time()) > 3600:
self.leader = None