(
        app_name, job_id,
        pending=False, completed=False, failed=False, skipped=False,
        _disable_maybe_queue_children_for_testing_only=False)
Set the state of a task

    `app_name` is a task identifier
    `job_id` is a subtask identifier
    `pending`, `completed` and `failed` (bool) are mutually exclusive
Set the state of a task
Set the state of a task
def _set_state_unsafe(
        app_name, job_id,
        pending=False, completed=False, failed=False, skipped=False,
        _disable_maybe_queue_children_for_testing_only=False):
    """
    Set the state of a task

    `app_name` is a task identifier
    `job_id` is a subtask identifier
    `pending`, `completed` and `failed` (bool) are mutually exclusive
    """
    qbcli = shared.get_qbclient()
    job_path = shared.get_job_path(app_name, job_id)
    state = validate_state(pending, completed, failed, skipped)
    if completed:
        if not _disable_maybe_queue_children_for_testing_only:
            _maybe_queue_children(
                parent_app_name=app_name, parent_job_id=job_id)

    if qbcli.exists(job_path):
        qbcli.set(job_path, state)
    else:
        qbcli.create(job_path, state)

    log.debug(
        "Set task state",
        extra=dict(state=state, app_name=app_name, job_id=job_id))
def _set_state_unsafe ( app_name , job_id , pending = False , completed = False , failed = False , skipped = False , _disable_maybe_queue_children_for_testing_only = False ) : qbcli = shared . get_qbclient ( ) job_path = shared . get_job_path ( app_name , job_id ) state = validate_state ( pending , completed , failed , skipped ) if completed : if not _disable_maybe_queue_children_for_testing_only : _maybe_queue_children ( parent_app_name = app_name , parent_job_id = job_id ) if qbcli . exists ( job_path ) : qbcli . set ( job_path , state ) else : qbcli . create ( job_path , state ) log . debug ( "Set task state" , extra = dict ( state = state , app_name = app_name , job_id = job_id ) )