mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Fix: Too many config read/write in Stored.clear()
This commit is contained in:
parent
4f214ee7a2
commit
048abcfde4
@ -510,12 +510,13 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
|||||||
Raises:
|
Raises:
|
||||||
TaskEnd: Call task `DailyQuest` and stop current task
|
TaskEnd: Call task `DailyQuest` and stop current task
|
||||||
"""
|
"""
|
||||||
if self.stored.DailyActivity.is_expired():
|
with self.multi_set():
|
||||||
logger.info('DailyActivity expired')
|
if self.stored.DailyActivity.is_expired():
|
||||||
self.stored.DailyActivity.clear()
|
logger.info('DailyActivity expired')
|
||||||
if self.stored.DailyQuest.is_expired():
|
self.stored.DailyActivity.clear()
|
||||||
logger.info('DailyQuest expired')
|
if self.stored.DailyQuest.is_expired():
|
||||||
self.stored.DailyQuest.clear()
|
logger.info('DailyQuest expired')
|
||||||
|
self.stored.DailyQuest.clear()
|
||||||
|
|
||||||
def update_battle_pass_quests(self):
|
def update_battle_pass_quests(self):
|
||||||
"""
|
"""
|
||||||
|
@ -290,12 +290,13 @@ class StoredDaily(StoredCounter, StoredExpiredAt0400):
|
|||||||
self.quest6 = ''
|
self.quest6 = ''
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
self.quest1 = ''
|
with self._config.multi_set():
|
||||||
self.quest2 = ''
|
self.quest1 = ''
|
||||||
self.quest3 = ''
|
self.quest2 = ''
|
||||||
self.quest4 = ''
|
self.quest3 = ''
|
||||||
self.quest5 = ''
|
self.quest4 = ''
|
||||||
self.quest6 = ''
|
self.quest5 = ''
|
||||||
|
self.quest6 = ''
|
||||||
|
|
||||||
|
|
||||||
class StoredDungeonDouble(StoredExpiredAt0400):
|
class StoredDungeonDouble(StoredExpiredAt0400):
|
||||||
@ -380,13 +381,14 @@ class StoredBattlePassWeeklyQuest(StoredCounter, StoredExpiredAtMonday0400):
|
|||||||
self.quest7 = ''
|
self.quest7 = ''
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
self.quest1 = ''
|
with self._config.multi_set():
|
||||||
self.quest2 = ''
|
self.quest1 = ''
|
||||||
self.quest3 = ''
|
self.quest2 = ''
|
||||||
self.quest4 = ''
|
self.quest3 = ''
|
||||||
self.quest5 = ''
|
self.quest4 = ''
|
||||||
self.quest6 = ''
|
self.quest5 = ''
|
||||||
self.quest7 = ''
|
self.quest6 = ''
|
||||||
|
self.quest7 = ''
|
||||||
|
|
||||||
|
|
||||||
class StoredBattlePassSimulatedUniverse(StoredCounter):
|
class StoredBattlePassSimulatedUniverse(StoredCounter):
|
||||||
|
Loading…
Reference in New Issue
Block a user