1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-07 16:17:23 +01:00

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

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: