title: Gunicorn does not execute statements within main
body: <pre><code>from flask import Flask, request, jsonify
  
  
  app = Flask(__name__)
  @app.route('/api', methods=['POST'])
  def predict():
      pass
      #Some statements to predict something
  
  
  if __name__ == '__main__':
      print("Hello World")
      app.run(host='0.0.0.0', debug=True)
  </code></pre>
  
  <p>When I run as 
  <code>gunicorn -b 0.0.0.0 app:app</code> I do not see the print statement. However when I run as <code>python app.py</code>, the "Hello World" gets printed. The app runs but it does not execute the print statement. Any idea what causes the Gunicorn to ignore what is within main()?</p>