[pve-devel] applied: [PATCH widget-toolkit] UpdateStore: fix 'undefined' interval
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 16 18:13:00 CEST 2020
On 4/15/20 4:30 PM, Dominik Csapak wrote:
> 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.csapak at 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";
>
applied, thanks!
More information about the pve-devel
mailing list