mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
web/state/queue: check if pipeline exists before removing workers
This commit is contained in:
parent
6c18f1d460
commit
1716c1d2af
@ -102,10 +102,12 @@ export function itemRunning(id: string, workerId: string) {
|
||||
|
||||
export function removeItem(id: string) {
|
||||
update(queueData => {
|
||||
for (const worker in queueData[id].pipeline) {
|
||||
removeWorkerFromQueue(queueData[id].pipeline[worker].workerId);
|
||||
if (queueData[id].pipeline) {
|
||||
for (const worker in queueData[id].pipeline) {
|
||||
removeWorkerFromQueue(queueData[id].pipeline[worker].workerId);
|
||||
}
|
||||
clearPipelineCache(queueData[id]);
|
||||
}
|
||||
clearPipelineCache(queueData[id]);
|
||||
|
||||
delete queueData[id];
|
||||
return queueData;
|
||||
|
Loading…
Reference in New Issue
Block a user