Reconcile host preparation on heartbeats instead of polls
This commit is contained in:
@@ -173,7 +173,7 @@ function supersedeUndeliveredDownloads(hostId: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
/** Agent heartbeats and polls drive durable preparation; no open UI or in-memory worker is needed. */
|
||||
/** Heartbeats drive durable preparation; idle checks do not reserve the SQLite writer. */
|
||||
export function reconcileHostPreparation(hostId: string): HostPreparation {
|
||||
return db().transaction(() => {
|
||||
const host = getHost(hostId);
|
||||
@@ -203,5 +203,5 @@ export function reconcileHostPreparation(hostId: string): HostPreparation {
|
||||
scheduleAvailabilityRefresh();
|
||||
}
|
||||
return status;
|
||||
}).immediate();
|
||||
})();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user