fix(xo-server): debounceWithKey.decorate(decorateWith(debounceWithKey

Introduced by 317a02084
This commit is contained in:
Julien Fontanet 2020-04-27 13:16:51 +02:00
parent 317a020841
commit 287214c2b2
2 changed files with 5 additions and 3 deletions

View File

@ -47,6 +47,7 @@ import { type Schedule } from '../scheduling'
import createSizeStream from '../../size-stream'
import parseDuration from '../../_parseDuration'
import { debounceWithKey, REMOVE_CACHE_ENTRY } from '../../_pDebounceWithKey'
import { decorateWith } from '../../_decorateWith'
import { waitAll } from '../../_waitAll'
import {
type DeltaVmExport,
@ -933,7 +934,7 @@ export default class BackupNg {
)()
}
@debounceWithKey.decorate(10e3, function keyFn(remoteId) {
@decorateWith(debounceWithKey, 10e3, function keyFn(remoteId) {
return [this, remoteId]
})
async _listVmBackupsOnRemote(remoteId: string) {

View File

@ -27,6 +27,7 @@ import {
import createSizeStream from '../size-stream'
import xapiObjectToXo from '../xapi-object-to-xo'
import { debounceWithKey } from '../_pDebounceWithKey'
import { decorateWith } from '../_decorateWith'
import { lvs, pvs } from '../lvm'
import {
forEach,
@ -301,7 +302,7 @@ export default class {
this._xo = xo
}
@debounceWithKey.decorate(DEBOUNCE_DELAY, function keyFn(remoteId) {
@decorateWith(debounceWithKey, DEBOUNCE_DELAY, function keyFn(remoteId) {
return [this, remoteId]
})
async listRemoteBackups(remoteId) {
@ -330,7 +331,7 @@ export default class {
return backups
}
@debounceWithKey.decorate(DEBOUNCE_DELAY, function keyFn(remoteId) {
@decorateWith(debounceWithKey, DEBOUNCE_DELAY, function keyFn(remoteId) {
return [this, remoteId]
})
async listVmBackups(remoteId) {