fix(xo-server): fix running replication job (#6437)
Introduced by 2d6b827fd
This commit is contained in:
parent
3d3b63a596
commit
d87210e903
@ -23,4 +23,5 @@
|
|||||||
|
|
||||||
<!--packages-start-->
|
<!--packages-start-->
|
||||||
|
|
||||||
|
- xo-server patch
|
||||||
<!--packages-end-->
|
<!--packages-end-->
|
||||||
|
@ -229,11 +229,17 @@ export default class BackupNg {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
if (Object.keys(remotes).length === 0) {
|
|
||||||
|
// Fails the job if all remotes are disabled
|
||||||
|
//
|
||||||
|
// TODO: integrate each failure in its own tasks and still proceed
|
||||||
|
// with other tasks like rolling snapshot and replication.
|
||||||
|
if (remoteIds.length > 0 && Object.keys(remotes).length === 0) {
|
||||||
const error = new Error(`couldn't instantiate any remote`)
|
const error = new Error(`couldn't instantiate any remote`)
|
||||||
error.errors = remoteErrors
|
error.errors = remoteErrors
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
||||||
// update remotes list with only the enabled remotes
|
// update remotes list with only the enabled remotes
|
||||||
job.remotes = {
|
job.remotes = {
|
||||||
id: {
|
id: {
|
||||||
|
Loading…
Reference in New Issue
Block a user