mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 01:02:59 +01:00
🚑 Fix condition #7
This commit is contained in:
parent
24f6a8c552
commit
9aea69bbdc
@ -121,7 +121,7 @@ class CronContainer {
|
||||
_createBackup() {
|
||||
logger.debug('Cron triggered !');
|
||||
let status = statusTools.getStatus();
|
||||
if (status.status === "creating" && status.status === "upload" && status.status === "download")
|
||||
if (status.status === "creating" || status.status === "upload" || status.status === "download")
|
||||
return;
|
||||
|
||||
let name = 'Auto-' + moment().format('YYYY-MM-DD_HH:mm');
|
||||
|
@ -166,7 +166,7 @@ function createNewBackup(name) {
|
||||
timeout: 1200000
|
||||
}
|
||||
request.post(option, (error, response, body) => {
|
||||
if (response.statusCode != 200) {
|
||||
if (response.statusCode !== 200) {
|
||||
status.status = "error";
|
||||
status.message = "Can't create new snapshot (" + error + ")";
|
||||
status.error_code = 5;
|
||||
@ -175,7 +175,7 @@ function createNewBackup(name) {
|
||||
reject(status.message);
|
||||
}
|
||||
else {
|
||||
body.data.slug
|
||||
body.data.slug;
|
||||
console.log('Snapshot created with id ' + body.data.slug);
|
||||
resolve(body.data.slug);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user