in some cases, we provide a config with interval set to 'undefined',
which gets happily applied to the config, but gets interpreted as '0'
when actually starting the task, resulting in constant api requests

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
this is just a quick fix, i am not so happy with it, we probably
should override setInterval and check for too small values there,
but i am not sure if we want to dictate that or leave it up to the user

 data/UpdateStore.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/data/UpdateStore.js b/data/UpdateStore.js
index 031ac6d..48fe674 100644
--- a/data/UpdateStore.js
+++ b/data/UpdateStore.js
@@ -29,6 +29,9 @@ Ext.define('Proxmox.data.UpdateStore', {
        let me = this;
 
        config = config || {};
+       if (config.interval === undefined) {
+           delete config.interval;
+       }
 
        if (!config.storeid) {
            throw "no storeid specified";
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to