fix: attempts handling
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user