Process only one consulate per run
This commit is contained in:
parent
84d608a9f4
commit
15613c19fd
@ -469,12 +469,19 @@ async function runner() {
|
||||
return;
|
||||
}
|
||||
|
||||
let processedConsulates = 0;
|
||||
for (let consulate of selectedConsulates) {
|
||||
// only one consulate per run
|
||||
if (processedConsulates > 0) {
|
||||
break;
|
||||
}
|
||||
// skip if not time to check
|
||||
if (config.consulates[consulate].nextCheckAt > new Date().toISOString()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
processedConsulates += 1;
|
||||
|
||||
console.log('Checking dates for ' + consulate);
|
||||
let availDates = await getAvailableDates(config.consulates[consulate].id);
|
||||
config.consulates[consulate].nextCheckAt = getFutureDate(config.frequency, 10);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user