Skip to content

Commit f3ab3e5

Browse files
committed
bug fix" minor improvement to create local backup
1 parent 6cfac06 commit f3ab3e5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

plogical/backupSchedule.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def createLocalBackup(virtualHost, backupLogPath):
7272
time.sleep(5)
7373
schedulerPath = '/home/cyberpanel/%s-backup.txt' % (virtualHost)
7474

75+
killCounter = 0
76+
7577
while (1):
7678
diff = datetime.now() - startingTime
7779

@@ -118,8 +120,11 @@ def createLocalBackup(virtualHost, backupLogPath):
118120
else:
119121
return 0, 'Backup process killed without reporting any error.'
120122
else:
121-
122-
return 0, 'Backup process killed without reporting any error.'
123+
if killCounter == 1:
124+
return 0, 'Backup process killed without reporting any error.'
125+
else:
126+
time.sleep(10)
127+
killCounter = 1
123128

124129
## file name read ends
125130

0 commit comments

Comments
 (0)