From ede80fc8c22fef0d5f88f68f80f3dd34089e4673 Mon Sep 17 00:00:00 2001 From: break27 Date: Thu, 25 Jun 2026 18:28:07 +0800 Subject: [PATCH] fix: attempts handling --- index.html | 2 +- main.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8890615..c84522d 100644 --- a/index.html +++ b/index.html @@ -463,7 +463,7 @@ while (await new Promise(o => setTimeout(o, 1000, true))) { let rate = index / uptime; let remaining = index ? Math.floor((total - index) / rate) : 0; - $('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${rate.toFixed(2)}/min)` : ''; + $('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : ''; break; case 'STANDBY': $('#send > span.text').innerText = 'Resume'; diff --git a/main.py b/main.py index feb6e2c..e4116ed 100644 --- a/main.py +++ b/main.py @@ -403,6 +403,7 @@ def main(driver: Chrome, logger = logging.getLogger('main')): raise Skip() if attempts > parameters['attempts']: + cell(index, column.sent).value = '❌' logger.warning("[%d/%d] Exhausted all allowed attempts; skipping", index-1, limit-1) raise Skip() @@ -541,8 +542,6 @@ def main(driver: Chrome, logger = logging.getLogger('main')): try: alert = catch(lambda x: x.find_element(By.CSS_SELECTOR, "div.io-ox-alert.io-ox-alert-error")) message = alert.text.replace('\n', ' ') - - cell(index, column.sent).value = '❌' click("div.io-ox-alert.io-ox-alert-error button[data-action='close']") logger.warning('Error while sending email (message: %s); retrying (%d)...', message, attempts) except TimeoutException: