Skip to content

Commit a0f69b6

Browse files
committed
removeTask
1 parent 3ad2eec commit a0f69b6

File tree

1 file changed

+8
-0
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+8
-0
lines changed

services/static-webserver/client/source/class/osparc/store/PollTasks.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ qx.Class.define("osparc.store.PollTasks", {
5555
});
5656
},
5757

58+
removeTask: function(task) {
59+
const tasks = this.getTasks();
60+
const index = tasks.findIndex(t => t.getTaskId() === task.getTaskId());
61+
if (index > -1) {
62+
tasks.splice(index, 1);
63+
}
64+
},
65+
5866
__addTask: function(taskData, interval = 1000) {
5967
const tasks = this.getTasks();
6068
const index = tasks.findIndex(t => t.getTaskId() === taskData["task_id"]);

0 commit comments

Comments
 (0)