1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 15:35:12 +00:00

perf: reduce config save times

This commit is contained in:
YoursFunny 2023-11-25 15:28:57 +08:00
parent e71118c09e
commit d756b0dc3f
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C
2 changed files with 6 additions and 4 deletions

View File

@ -41,8 +41,9 @@ class Bounty(BountyUI):
if action == 'stop':
raise RequestHumanTakeover
elif action == 'skip':
self.config.task_delay(server_update=True)
self.config.task_stop()
with self.config.multi_set():
self.config.task_delay(server_update=True)
self.config.task_stop()
@property
def is_ticket_enough(self) -> bool:

View File

@ -42,8 +42,9 @@ class Scrimmage(ScrimmageUI):
if action == 'stop':
raise RequestHumanTakeover
elif action == 'skip':
self.config.task_delay(server_update=True)
self.config.task_stop()
with self.config.multi_set():
self.config.task_delay(server_update=True)
self.config.task_stop()
@property
def is_ticket_enough(self) -> bool: