Backups: User-initiated and cron-initiated jobs will have the same lockname

So that some poor timing (initiating a backup when there's a cron-initiated backup)
doesn't screw everything up.
This commit is contained in:
David Duque 2020-07-11 09:16:32 +01:00
parent 79e2398d71
commit ccf60c7017
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ def perform_backup(full_backup, user_initiated=False):
# Create an global exclusive lock so that the backup script
# cannot be run more than one.
lock = Lock(die=(not user_initiated))
lock = Lock(name="mailinabox_backup_daemon", die=(not user_initiated))
if user_initiated:
# God forgive me for what I'm about to do
try: