fix scheduleSingleTask

This commit is contained in:
mononaut 2026-08-01 17:07:13 +00:00 committed by nymkappa
parent 80f70c1aac
commit 0260d4d365
No known key found for this signature in database
GPG key ID: A7895A957BA87DBA

View file

@ -113,12 +113,11 @@ class Indexer {
}
}
this.tasksScheduled[task] = setTimeout(async () => {
delete this.tasksScheduled[task];
try {
await this.runSingleTask(task);
} catch (e) {
logger.err(`Unexpected error in scheduled task ${task}: ` + (e instanceof Error ? e.message : e));
} finally {
clearTimeout(this.tasksScheduled[task]);
}
}, timeout);
}