Skip to content

Commit 9dc1625

Browse files
committed
bug fix: continue backups if website is deleted from main CP
1 parent 4c94da1 commit 9dc1625

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

plogical/IncScheduler.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,16 @@ def runGoogleDriveBackups(type):
292292
GDriveJobLogs(owner=items, status=backupSchedule.INFO, message='Starting backup job..').save()
293293

294294
for website in items.gdrivesites_set.all():
295+
296+
### If this website dont exists continue
297+
298+
try:
299+
Websites.objects.get(domain=website.domain)
300+
except:
301+
continue
302+
303+
##
304+
295305
try:
296306
GDriveJobLogs(owner=items, status=backupSchedule.INFO, message='Local backup creation started for %s..' % (website.domain)).save()
297307

@@ -540,6 +550,15 @@ def startNormalBackups(type):
540550
else:
541551
domain = site.domain.domain
542552

553+
### If this website dont exists continue
554+
555+
try:
556+
Websites.objects.get(domain=domain)
557+
except:
558+
continue
559+
560+
##
561+
543562
## Save currently backing domain in db, so that i can restart from here when prematurely killed
544563

545564
jobConfig['website'] = domain

0 commit comments

Comments
 (0)