-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Im trying to make this work when my server is started as a subprocess. We use Bottle and Gevent. when I use the AUTOWRAPT_BOOTSTRAP=autodynatrace variable, I see the AWS pods my app is running on, and I see external calls to external API's and Databases, but I dont see anything incoming to my web server.
from gevent import monkey
import json
monkey.noisey = False
monkey.patch_all(subprocess=True, thread=True)
from gevent.pywsgi import WSGIServer
from bottle import route, run, static_file, request, template, error, response, default_app, redirect, ServerAdapter, server_names, HTTPResponse
def main():
server_names['gevent'] = GeventServer
application = default_app()
server_settings = json.loads('{"server":"gevent"}'))
application.run(**server_settings, host='0.0.0.0', port=8443, reloader=False,
keyfile=os.environ.get('HTTPS_PRIVATE_KEY_PATH', ''),
certfile=os.environ.get('HTTPS_PUBLIC_CERT_PATH', ''))
class GeventServer(ServerAdapter):
""" For asynchronous responses. """
def run(self, handler):
if cfg.bottle_run_ssl.upper() == 'TRUE':
app = WSGIServer((self.host, 8443), handler, keyfile=os.environ.get('HTTPS_PRIVATE_KEY_PATH', ''),
certfile=os.environ.get('HTTPS_PUBLIC_CERT_PATH', ''))
else:
app = WSGIServer((self.host, 8080), handler)
app.serve_forever()
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request