From d7f767c163188adb8d490648412ae4f946e2ec30 Mon Sep 17 00:00:00 2001 From: positnuec <93694981+positnuec@users.noreply.github.com> Date: Sat, 25 Jul 2026 17:43:16 +0800 Subject: [PATCH] Opt: raise admiral trial check priority over downtime strategy to prevent blocking --- module/exercise/exercise.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/exercise/exercise.py b/module/exercise/exercise.py index 5ff94aa5b..d311dee23 100644 --- a/module/exercise/exercise.py +++ b/module/exercise/exercise.py @@ -233,6 +233,13 @@ class Exercise(ExerciseCombat): remain_hours = int(remain_time.total_seconds() // 3600) admiral_start, admiral_end = admiral_interval + if admiral_start > remain_hours >= admiral_end: + logger.info('Reach set time for admiral trial, using all attempts') + return True + if remain_hours < 6: + logger.info('Exercise period remain less than 6 hours, using all attempts') + return True + downtime_strategy = self._get_downtime_strategy(now) if downtime_strategy is True: logger.info('Downtime today, using all attempts before downtime') @@ -243,13 +250,6 @@ class Exercise(ExerciseCombat): logger.info('Reach Thursday, using all attempts before downtime') return True - if admiral_start > remain_hours >= admiral_end: - logger.info('Reach set time for admiral trial, using all attempts') - return True - if remain_hours < 6: - logger.info('Exercise period remain less than 6 hours, using all attempts') - return True - return False def _should_delay(self, now, next_update, forced_clear):