This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.web.framework.middleware.request_id

import uuid

[docs]class RequestIDMiddleware(object): """ A WSGI middleware that creates a unique ID for the request and puts it in the environment """
[docs] def __init__(self, app, global_conf=None): self.app = app
def __call__(self, environ, start_response): environ['request_id'] = uuid.uuid1().hex return self.app(environ, start_response)