fix: task slicing range
This commit is contained in:
+1
-1
@@ -258,7 +258,7 @@ async function handlePrimaryButtonClick() {
|
||||
|
||||
if (options.slice) {
|
||||
start = $('#offset').valueAsNumber * $('#chunksize').valueAsNumber;
|
||||
end = Math.min(minor || major, $('#chunksize').valueAsNumber);
|
||||
end = Math.min(major, $('#chunksize').valueAsNumber);
|
||||
}
|
||||
|
||||
await Rpc2.invoke('begin', { params: [options, parameters, start, end] });
|
||||
|
||||
@@ -406,12 +406,12 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
|
||||
raise Skip()
|
||||
|
||||
if options.get('slice'):
|
||||
if (items := options.get('subcategories')) and (item := str(cell(index, column.region).value)) not in items:
|
||||
logger.info("[%d/%d] Value '%s' not enlisted; skipping '%s'", index-1, limit-1, item, email)
|
||||
raise Next()
|
||||
if index < start or index >= start + end:
|
||||
logger.info("[%d/%d] Not planned; skipping '%s'", index-1, limit-1, email)
|
||||
raise Next()
|
||||
if (items := options.get('subcategories')) and (item := str(cell(index, column.region).value)) not in items:
|
||||
logger.info("[%d/%d] Value '%s' not enlisted; skipping '%s'", index-1, limit-1, item, email)
|
||||
raise Next()
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user