(app_name, job_id, q, lock)
Ensure parents are completed and if they aren't, return False
Ensure parents are completed and if they aren't, return False
Ensure parents are completed and if they aren t return False
def parents_completed(app_name, job_id, q, lock):
    """Ensure parents are completed and if they aren't, return False"""
    parents_completed, consume_queue, parent_lock = \
        qb.ensure_parents_completed(app_name=app_name, job_id=job_id)
    if parents_completed is False:
        if consume_queue:
            q.consume()
            parent_lock is not None and parent_lock.release()
        else:
            _send_to_back_of_queue(
                q=q, app_name=app_name, job_id=job_id)
        lock.release()
        return False
    else:
        assert parent_lock is None, "Code Error"
        return True
def parents_completed ( app_name , job_id , q , lock ) : parents_completed , consume_queue , parent_lock = qb . ensure_parents_completed ( app_name = app_name , job_id = job_id ) if parents_completed is False : if consume_queue : q . consume ( ) parent_lock is not None and parent_lock . release ( ) else : _send_to_back_of_queue ( q = q , app_name = app_name , job_id = job_id ) lock . release ( ) return False else : assert parent_lock is None , "Code Error" return True