def get_workers(app):
    """Get all workers connected to a celery application.

    :param `celery.Celery` app: the celery application
    :return: A list of all connected workers
    :rtype: list
    """
    i = app.control.inspect()
    workers = i.ping()
    if workers is None:
        return []
    return [*workers]
