Example #1
0
def has_lock(task_id, user_id, timeout):
    lock_manager = LockManager(sentinel.master, timeout)
    task_users_key = get_task_users_key(task_id)
    return lock_manager.has_lock(task_users_key, user_id)
Example #2
0
def has_lock(project_id, task_id, user_id, timeout):
    lock_manager = LockManager(sentinel.master, timeout)
    key = get_key(project_id, task_id)
    return lock_manager.has_lock(key, user_id)