ext6migrate: add unqueue to UpdateQueue
in the event of a destroyed or stopped object/updateStore, we do not want to execute queued requests, thus we need to unqueue them Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
95c4a0cb84
commit
fd02b3c506
@ -51,6 +51,16 @@ Ext.define('PVE.data.UpdateQueue', {
|
||||
queue.push(storeid);
|
||||
}
|
||||
start_update();
|
||||
},
|
||||
unqueue: function(store) {
|
||||
var storeid = store.storeid;
|
||||
if (!storeid) {
|
||||
throw "unabel to unqueue store without storeid";
|
||||
}
|
||||
if (queue_idx[storeid]) {
|
||||
Ext.Array.remove(queue,storeid);
|
||||
queue_idx[storeid] = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ Ext.define('PVE.data.UpdateStore', {
|
||||
},
|
||||
stopUpdate: function() {
|
||||
load_task.cancel();
|
||||
PVE.data.UpdateQueue.unqueue(me);
|
||||
}
|
||||
});
|
||||
|
||||
@ -49,6 +50,7 @@ Ext.define('PVE.data.UpdateStore', {
|
||||
|
||||
me.on('destroy', function() {
|
||||
load_task.cancel();
|
||||
PVE.data.UpdateQueue.unqueue(me);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user