mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 23:41:23 -03:30
close the persistent shelve when we're done checking it
this code was added to detect celerybeat shelve .db corruption, but it caused a different issue; opening the shelve in this way puts a write lock on it, which means that when we attempt to open it _again_ moments later, we can't. when we're done checking the validity of the file, we need to close it
This commit is contained in:
parent
4ce18618cb
commit
37dbfa88f9
@ -87,6 +87,11 @@ class Command(BaseCommand):
|
||||
except Exception:
|
||||
logger.exception('{} is corrupted, removing.'.format(sched_file))
|
||||
sched._remove_db()
|
||||
finally:
|
||||
try:
|
||||
sched.close()
|
||||
except Exception:
|
||||
logger.exception('{} failed to sync/close'.format(sched_file))
|
||||
|
||||
beat.Beat(
|
||||
30,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user