def task_revoked_handler(request, **kwargs):
    """Runs if a task has been revoked. This will be used to push a websocket update for revoked events.

    If the websockets version of this package is not installed, this will fail silently."""
    _result = ('terminated' if kwargs.pop('terminated') else None) or ('expired' if kwargs.pop('expired') else None) \
        or 'revoked'
    result = KnownResult(request.id, _result, 'REVOKED')
    data = Progress(result).get_info()
    WebSocketProgressRecorder.push_update(request.id, data=data, final=True)
Runs if a task has been revoked. This will be used to push a websocket update for revoked events.

    If the websockets version of this package is not installed, this will fail silently.
celery_progress/websockets/tasks.py