mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +00:00
hotfix to release leftover locks on restart
This commit is contained in:
parent
9528e11ca2
commit
f22e02d2f1
@ -3,7 +3,7 @@
|
||||
import os
|
||||
|
||||
from home.src.config import AppConfig
|
||||
from home.src.helper import set_message
|
||||
from home.src.helper import del_message, set_message
|
||||
from home.src.index_management import index_check
|
||||
|
||||
from .tasks import app as celery_app
|
||||
@ -36,7 +36,16 @@ def make_folders():
|
||||
continue
|
||||
|
||||
|
||||
def release_lock():
|
||||
"""make sure there are no leftover locks set in redis on container start"""
|
||||
all_locks = ["manual_import", "downloading"]
|
||||
for lock in all_locks:
|
||||
print("release leftover lock: " + lock)
|
||||
del_message(lock)
|
||||
|
||||
|
||||
__all__ = ("celery_app",)
|
||||
make_folders()
|
||||
sync_redis_state()
|
||||
index_check()
|
||||
release_lock()
|
||||
|
Loading…
Reference in New Issue
Block a user