def get_task_id(headers, body):
    """
    Across Celery versions, the task id can exist in a couple of places.
    """
    id = headers.get('id', None)
    if id is None:
        id = body.get('id', None)
    return id