def db_cleanup(sender, **kwargs):
    logger.debug("lock-addon: Looking for expired locks")
    locks = Lock.objects.expired()
    for lock in locks:
        logger.debug("lock-addon: Deleting lock: %s" % lock)
        lock.delete()
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/addons/locks/handlers.py/db_cleanup/original