Skip to content

Commit 8784c00

Browse files
committed
One more tiny tweak
1 parent 024c9cc commit 8784c00

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/cli-v3/src/dev/devSupervisor.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,9 @@ class DevSupervisor implements WorkerRuntime {
517517

518518
//stop the worker if it is deprecated and there are no more runs
519519
if (worker.deprecated) {
520-
this.#tryDeleteWorker(message.backgroundWorker.friendlyId).finally(() => { });
520+
this.#tryDeleteWorker(message.backgroundWorker.friendlyId).catch((err) => {
521+
logger.debug("[DevSupervisor] Failed to delete worker", { error: err });
522+
});
521523
}
522524
},
523525
onSubscribeToRunNotifications: async (run, snapshot) => {
@@ -614,7 +616,9 @@ class DevSupervisor implements WorkerRuntime {
614616
}
615617

616618
existingWorker.deprecate();
617-
this.#tryDeleteWorker(workerId).finally(() => { });
619+
this.#tryDeleteWorker(workerId).catch((err) => {
620+
logger.debug("[DevSupervisor] Failed to delete worker", { error: err });
621+
});
618622
}
619623

620624
this.workers.set(worker.serverWorker.id, worker);
@@ -801,12 +805,15 @@ class DevSupervisor implements WorkerRuntime {
801805
);
802806

803807
for (const { id, worker } of toRemove) {
804-
805808
logger.debug("[DevSupervisor] Pruning old deprecated worker and cleaning up build dir", {
806809
workerId: id,
807810
version: worker.serverWorker?.version,
808811
});
809812

813+
if (worker.serverWorker?.version) {
814+
this.taskRunProcessPool?.deprecateVersion(worker.serverWorker.version);
815+
}
816+
810817
worker.stop();
811818
this.workers.delete(id);
812819
}

0 commit comments

Comments
 (0)