(task, error_message)
Call this function and return the value from within a celery task to abort

    with an error message that gets passed on in a way that case importer
    will pick up and display.

    Currently it doesn't return anything and does all its magic by manually
    setting task metadata and raising Ignore,
    but the internals could change to do this through a return value instead.
Call this function and return the value from within a celery task to abort
Call this function and return the value from within a celery task to abort
def exit_celery_with_error_message(task, error_message):
    """
    Call this function and return the value from within a celery task to abort

    with an error message that gets passed on in a way that case importer
    will pick up and display.

    Currently it doesn't return anything and does all its magic by manually
    setting task metadata and raising Ignore,
    but the internals could change to do this through a return value instead.
    """
    update_task_state(task, states.FAILURE, get_interned_exception(error_message))
    raise Ignore()
def exit_celery_with_error_message ( task , error_message ) : update_task_state ( task , states . FAILURE , get_interned_exception ( error_message ) ) raise Ignore ( )