fix: omit counts
This commit is contained in:
+2
-2
@@ -448,11 +448,11 @@ while (await new Promise(o => setTimeout(o, 1000, true))) {
|
||||
$('#send').classList.add('pulse');
|
||||
$('#timezoneLabel').innerText = Temporal.Now.zonedDateTimeISO(locale.timezone).toLocaleString(locale.name);
|
||||
|
||||
let { done, skip, orts, email, subject, recipient } = await Rpc2.invoke('progress').catch(() => new Object());
|
||||
let { done, skip, omit, email, subject, recipient } = await Rpc2.invoke('progress').catch(() => new Object());
|
||||
let limit = minor || major - 1;
|
||||
let chunk = $('#chunksize').valueAsNumber;
|
||||
let total = $('#slice').checked ? Math.min(chunk, limit - chunk * $('#offset').valueAsNumber) : limit;
|
||||
let index = $('#slice').checked ? done + skip - orts : done + skip;
|
||||
let index = $('#slice').checked ? done + skip - omit : done + skip;
|
||||
|
||||
$('#progressLabel').innerText = `${parseFloat(index / total * 100).toFixed(2)}% (${index}/${total})`;
|
||||
$('#subjectLabel').innerText = subject ?? '';
|
||||
|
||||
@@ -373,7 +373,7 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
|
||||
|
||||
progress['done'] = 0
|
||||
progress['skip'] = 0
|
||||
progress['orts'] = 0
|
||||
progress['omit'] = 0
|
||||
progress['subject'] = subject
|
||||
logger.info('Done')
|
||||
except Cancel:
|
||||
@@ -410,11 +410,12 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
|
||||
if (sent := cell(index, column.sent).value) is not None and str(sent).strip():
|
||||
logger.info("[%d/%d] Already visited; skipping '%s'", index-1, limit-1, email)
|
||||
occurrence[code] += 1
|
||||
progress['omit'] += 1
|
||||
raise Skip()
|
||||
|
||||
if index < options.get('start', 2) or progress['done'] >= options.get('limit', limit):
|
||||
logger.info("[%d/%d] Not planned; skipping '%s'", index-1, limit-1, email)
|
||||
progress['orts'] += 1
|
||||
progress['omit'] += 1
|
||||
raise Skip()
|
||||
|
||||
match options.get('occurrence'):
|
||||
|
||||
Reference in New Issue
Block a user