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-->
|
||||
|
||||
- xo-server patch
|
||||
<!--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`)
|
||||
error.errors = remoteErrors
|
||||
throw error
|
||||
}
|
||||
|
||||
// update remotes list with only the enabled remotes
|
||||
job.remotes = {
|
||||
id: {
|
||||
|
Loading…
Reference in New Issue
Block a user