fix(pi): keep active runs alive during background sleep
This commit is contained in:
@@ -101,6 +101,7 @@ export class BackgroundLifecycleController extends EventEmitter {
|
||||
this.stopping = true;
|
||||
try {
|
||||
await this.options.onSleep();
|
||||
if (!this.shouldSleep() || this.leases.size > 0) return;
|
||||
await this.options.onStopRuntime();
|
||||
this.emit('sleep');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user