1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-25 07:47:05 +00: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
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A

View File

@ -215,7 +215,7 @@ def perform_backup(full_backup, user_initiated=False):
# Create an global exclusive lock so that the backup script # Create an global exclusive lock so that the backup script
# cannot be run more than one. # 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: if user_initiated:
# God forgive me for what I'm about to do # God forgive me for what I'm about to do
try: try: