12 lines
302 B
Python
12 lines
302 B
Python
from app.daemons import base
|
|
from app.storage.mongo import locks
|
|
import time
|
|
from app.utils import time as time_utils
|
|
|
|
|
|
class Daemon(base.Daemon):
|
|
def execute(self):
|
|
while True:
|
|
locks.collection.delete_many({'locked_until': {'$lt': time_utils.now()}})
|
|
time.sleep(5)
|