Skip to content

Commit 2081ecb

Browse files
committed
stopInterval
1 parent 7140857 commit 2081ecb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

services/static-webserver/client/source/class/osparc/jobs/RunsBrowser.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
3434
text: filterText,
3535
});
3636
});
37+
38+
this.__reloadInterval = setInterval(() => this.getChildControl("runs-table").reloadRuns(), 10*1000);
3739
},
3840

3941
events: {
4042
"runSelected": "qx.event.type.Data",
4143
},
4244

4345
members: {
46+
__reloadInterval: null,
47+
4448
_createChildControlImpl: function(id) {
4549
let control;
4650
switch (id) {
@@ -79,5 +83,11 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
7983
const runsTable = this.getChildControl("runs-table");
8084
runsTable.reloadRuns();
8185
},
86+
87+
stopInterval: function() {
88+
if (this.__reloadInterval) {
89+
clearInterval(this.__reloadInterval);
90+
}
91+
},
8292
}
8393
})

services/static-webserver/client/source/class/osparc/jobs/RunsWindow.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ qx.Class.define("osparc.jobs.RunsWindow", {
6666
this.getChildControl("title").setValue(this.tr("Runs and Clusters"));
6767
stack.setSelection([runsAndClusters]);
6868
});
69+
70+
this.addListener("close", () => {
71+
runsAndClusters.getChildControl("runs-browser").stopInterval();
72+
});
6973
},
7074
}
7175
});

0 commit comments

Comments
 (0)