~cjwatson/storm/py39

« back to all changes in this revision

Viewing changes to storm/wsgi.py

  • Committer: Colin Watson
  • Date: 2020-05-26 12:26:41 UTC
  • mfrom: (554.1.3 docstring-syntax)
  • Revision ID: cjwatson@canonical.com-20200526122641-591kmbjqf24em97w
Improve various docstrings, mainly fixing reST/epytext syntax. [r=ilasc,doismellburning]

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
__all__ = ['make_app']
30
30
 
31
31
def make_app(app):
32
 
    """Capture the per-request timeline object needed for storm tracing.
 
32
    """Capture the per-request timeline object needed for Storm tracing.
33
33
 
34
 
    To use firstly make your app and then wrap it with this make_app::
 
34
    To use firstly make your app and then wrap it with this C{make_app}::
35
35
 
36
36
       >>> app, find_timeline = make_app(app)
37
37
 
38
 
    Then wrap the returned app with the timeline app (or anything that sets
39
 
    environ['timeline.timeline'])::
 
38
    Then wrap the returned app with the C{timeline} app (or anything that
 
39
    sets C{environ['timeline.timeline']})::
40
40
 
41
41
       >>> app = timeline.wsgi.make_app(app)
42
42
 
43
 
    Finally install a timeline tracer to capture storm queries::
 
43
    Finally install a timeline tracer to capture Storm queries::
44
44
 
45
45
       >>> install_tracer(TimelineTracer(find_timeline))
46
46
 
47
47
    @return: A wrapped WSGI app and a timeline factory function for use with
48
 
    TimelineTracer.
 
48
        L{TimelineTracer <storm.tracer.TimelineTracer>}.
49
49
    """
50
50
    timeline_map = threading.local()
51
51
    def wrapper(environ, start_response):