oops my examples were broken, should be:<br><span></span><br><pre><span>def</span> <span>hello_world_app</span><span>(</span><span>environ</span><span>,</span> <span>start_response</span><span>):</span>
    <span>status</span> <span>=</span> <span>&#39;200 OK&#39;</span> <span># HTTP Status</span>
    <span>headers</span> <span>=</span> <span>[(</span><span>&#39;Content-type&#39;</span><span>,</span> <span>&#39;text/plain&#39;</span><span>)]</span> 
    <span>start_response</span><span>(</span><span>status</span><span>,</span> <span>headers</span><span>)</span>
    <span>return</span> <span>[</span><span>&quot;Hello World&quot;</span><span>]</span><span></span>
<br>def shutdown():   # or maybe something else as an argument I don&#39;t know<br>   do_some_cleanup()<br><br></pre><br>and:<br><br>$ gunicorn myapp:<span>hello_world_app</span>
 myapp:shutdown<br><br><br><br>Cheers<br>Tarek<br>