mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-19 14:02:05 +01:00
bug fix: continue backups if website is deleted from main CP
This commit is contained in:
@@ -292,6 +292,16 @@ class IncScheduler():
|
||||
GDriveJobLogs(owner=items, status=backupSchedule.INFO, message='Starting backup job..').save()
|
||||
|
||||
for website in items.gdrivesites_set.all():
|
||||
|
||||
### If this website dont exists continue
|
||||
|
||||
try:
|
||||
Websites.objects.get(domain=website.domain)
|
||||
except:
|
||||
continue
|
||||
|
||||
##
|
||||
|
||||
try:
|
||||
GDriveJobLogs(owner=items, status=backupSchedule.INFO, message='Local backup creation started for %s..' % (website.domain)).save()
|
||||
|
||||
@@ -540,6 +550,15 @@ Automatic backup failed for %s on %s.
|
||||
else:
|
||||
domain = site.domain.domain
|
||||
|
||||
### If this website dont exists continue
|
||||
|
||||
try:
|
||||
Websites.objects.get(domain=domain)
|
||||
except:
|
||||
continue
|
||||
|
||||
##
|
||||
|
||||
## Save currently backing domain in db, so that i can restart from here when prematurely killed
|
||||
|
||||
jobConfig['website'] = domain
|
||||
|
||||
Reference in New Issue
Block a user