Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions coc/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ async def _run_war_update(self, clan_tag, cwl_round=None):
meth = self.get_clan_war

try:
war = await meth(clan_tag, cls=self.war_cls, round=cwl_round)
war = await meth(clan_tag, cls=self.war_cls, cwl_round=cwl_round)
except (Maintenance, PrivateWarLog):
self._safe_unlock(lock)
return
Expand All @@ -1109,8 +1109,9 @@ async def _run_war_update(self, clan_tag, cwl_round=None):
# sleep for either the global retry or whenever a new war object is available, whichever is smaller.
self.loop.call_later(max(war._response_retry, self.war_retry_interval), self._safe_unlock, lock)

cached_war = self._get_cached_war(clan_tag)
self._update_war(clan_tag, war)
# use war:cwl_round:clan_tag key to fetch the right war during cwl
cached_war = self._get_cached_war(key)
self._update_war(key, war)

if not cached_war:
self._safe_unlock(lock)
Expand Down
Loading