From b8eeee1d5dc0f3ff9b9f9e7740574698f3fcdbb1 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 5 May 2020 14:23:22 +0200 Subject: [PATCH] feat(xo-server/listVmBackups): use `backup.listingDebounce` setting (#4972) --- packages/xo-server/src/xo-mixins/backups-ng/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/xo-server/src/xo-mixins/backups-ng/index.js b/packages/xo-server/src/xo-mixins/backups-ng/index.js index a4e233cd1..de2258f2e 100644 --- a/packages/xo-server/src/xo-mixins/backups-ng/index.js +++ b/packages/xo-server/src/xo-mixins/backups-ng/index.js @@ -934,9 +934,15 @@ export default class BackupNg { )() } - @decorateWith(debounceWithKey, 10e3, function keyFn(remoteId) { - return [this, remoteId] - }) + @decorateWith( + debounceWithKey, + function() { + return parseDuration(this._backupOptions.listingDebounce) + }, + function keyFn(remoteId) { + return [this, remoteId] + } + ) async _listVmBackupsOnRemote(remoteId: string) { const app = this._app const backupsByVm = {}