def any_tasks_failed(tasks):
    """Return True if any rq job failed."""
    for task in tasks:
        if task.get_rq_job() is None:
            # job is not available in rq anymore
            continue
        else:
            if task.get_rq_job().get_status() == "failed":
                return True
    return False