mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
Change default returncode for log. By @real-yfprojects (#1193)
This commit is contained in:
parent
3b87419431
commit
da766c5172
2 changed files with 9 additions and 4 deletions
|
@ -1,17 +1,19 @@
|
|||
import logging
|
||||
import threading
|
||||
from datetime import datetime as dt, date, timedelta
|
||||
from datetime import date
|
||||
from datetime import datetime as dt
|
||||
from datetime import timedelta
|
||||
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
|
||||
from vorta.borg.check import BorgCheckJob
|
||||
from vorta.borg.create import BorgCreateJob
|
||||
from vorta.borg.list_repo import BorgListRepoJob
|
||||
from vorta.borg.prune import BorgPruneJob
|
||||
from vorta.i18n import translate
|
||||
|
||||
from vorta.store.models import BackupProfileModel, EventLogModel
|
||||
from vorta.notifications import VortaNotifications
|
||||
from vorta.store.models import BackupProfileModel, EventLogModel
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -68,6 +70,7 @@ def set_timer_for_profile(self, profile_id):
|
|||
EventLogModel.subcommand == 'create',
|
||||
EventLogModel.category == 'scheduled',
|
||||
EventLogModel.profile == profile.id,
|
||||
0 <= EventLogModel.returncode <= 1,
|
||||
).order_by(EventLogModel.end_time.desc()).first()
|
||||
|
||||
# Desired interval between scheduled backups. Uses datetime.timedelta() units.
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
import peewee as pw
|
||||
from playhouse import signals
|
||||
|
||||
from vorta.utils import slugify
|
||||
|
||||
DB = pw.Proxy()
|
||||
|
@ -151,7 +153,7 @@ class EventLogModel(BaseModel):
|
|||
category = pw.CharField()
|
||||
subcommand = pw.CharField(null=True)
|
||||
message = pw.CharField(null=True)
|
||||
returncode = pw.IntegerField(default=1)
|
||||
returncode = pw.IntegerField(default=-1)
|
||||
params = JSONField(null=True)
|
||||
profile = pw.CharField(null=True)
|
||||
repo_url = pw.CharField(null=True)
|
||||
|
|
Loading…
Reference in a new issue