mirror of https://github.com/borgbase/vorta
Fixes attribute error in #1.
This commit is contained in:
parent
5bc5a198cf
commit
a9d01a4db4
|
@ -81,7 +81,7 @@
|
|||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Need hosting for your Borg repository? <a href="https://www.borgbackup.org/support/commercial.html"><span style=" text-decoration: underline; color:#0000ff;">View providers</span></a>.</p></body></html></string>
|
||||
<string><html><head/><body><p>Needs Borg installed server-side. Or try <a href="https://www.borgbase.com"><span style=" text-decoration: underline; color:#0000ff;">BorgBase.</span></a> 100GB free during Beta.</p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>SSH Login Key:</string>
|
||||
<string>SSH Key:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -122,7 +122,7 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>To access repository securely. Keep at default if you already have one. Or create new key.</string>
|
||||
<string>To access repository securely. Keep default to use all your existing keys. Or create new key.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -5,7 +5,6 @@ from .borg_runner import BorgThread
|
|||
from .models import BackupProfileMixin
|
||||
|
||||
|
||||
|
||||
class VortaScheduler(QtScheduler, BackupProfileMixin):
|
||||
def __init__(self, parent):
|
||||
super().__init__()
|
||||
|
@ -15,22 +14,24 @@ class VortaScheduler(QtScheduler, BackupProfileMixin):
|
|||
|
||||
def reload(self):
|
||||
self.remove_all_jobs()
|
||||
if self.profile.schedule_mode == 'off':
|
||||
self.next_job = 'Manual Backups'
|
||||
return None
|
||||
elif self.profile.schedule_mode == 'interval':
|
||||
trigger = cron.CronTrigger(hour=f'*/{profile.schedule_interval_hours}',
|
||||
trigger = None
|
||||
if self.profile.schedule_mode == 'interval':
|
||||
trigger = cron.CronTrigger(hour=f'*/{self.profile.schedule_interval_hours}',
|
||||
minute=self.profile.schedule_interval_minutes)
|
||||
elif self.profile.schedule_mode == 'fixed':
|
||||
trigger = cron.CronTrigger(hour=self.profile.schedule_fixed_hour,
|
||||
minute=self.profile.schedule_fixed_minute)
|
||||
|
||||
self.add_job(self.create_backup, trigger, id='create-backup', misfire_grace_time=180)
|
||||
if trigger is not None:
|
||||
self.add_job(self.create_backup, trigger, id='create-backup', misfire_grace_time=180)
|
||||
|
||||
@property
|
||||
def next_job(self):
|
||||
job = self.get_job('create-backup')
|
||||
return job.next_run_time.strftime('%Y-%m-%d %H:%M')
|
||||
if job is None:
|
||||
return 'Manual Backups'
|
||||
else:
|
||||
return job.next_run_time.strftime('%Y-%m-%d %H:%M')
|
||||
|
||||
@classmethod
|
||||
def create_backup(cls):
|
||||
|
|
Loading…
Reference in New Issue