@@ -659,11 +659,6 @@ def find_mimetypes():
659659 process-group=express application-group=server-metrics
660660"""
661661
662- APACHE_WDB_CONFIG = """
663- WSGIImportScript '%(server_root)s/wdb-server.py' \\
664- process-group=express application-group=wdb-server
665- """
666-
667662def generate_apache_config (options ):
668663 with open (options ['httpd_conf' ], 'w' ) as fp :
669664 print (APACHE_GENERAL_CONFIG % options , file = fp )
@@ -718,15 +713,12 @@ def generate_apache_config(options):
718713 print (APACHE_INCLUDE_CONFIG % dict (filename = filename ),
719714 file = fp )
720715
721- if options ['with_newrelic_platform' ] or options [ 'with_wdb' ] :
716+ if options ['with_newrelic_platform' ]:
722717 print (APACHE_TOOLS_CONFIG % options , file = fp )
723718
724719 if options ['with_newrelic_platform' ]:
725720 print (APACHE_METRICS_CONFIG % options , file = fp )
726721
727- if options ['with_wdb' ]:
728- print (APACHE_WDB_CONFIG % options , file = fp )
729-
730722_interval = 1.0
731723_times = {}
732724_files = []
@@ -873,7 +865,7 @@ class ApplicationHandler(object):
873865
874866 def __init__ (self , entry_point , application_type = 'script' ,
875867 callable_object = 'application' , mount_point = '/' ,
876- with_newrelic_agent = False , with_wdb = False , debug_mode = False ,
868+ with_newrelic_agent = False , debug_mode = False ,
877869 enable_debugger = False ):
878870
879871 self .entry_point = entry_point
@@ -916,9 +908,6 @@ def __init__(self, entry_point, application_type='script',
916908 if with_newrelic_agent :
917909 self .setup_newrelic_agent ()
918910
919- if with_wdb :
920- self .setup_wdb ()
921-
922911 self .debug_mode = debug_mode
923912 self .enable_debugger = enable_debugger
924913
@@ -941,10 +930,6 @@ def setup_newrelic_agent(self):
941930 self .application = newrelic .agent .WSGIApplicationWrapper (
942931 self .application )
943932
944- def setup_wdb (self ):
945- from wdb .ext import WdbMiddleware
946- self .application = WdbMiddleware (self .application )
947-
948933 def setup_post_mortem_debugging (self ):
949934 self .application = PostMortemDebugger (self .application )
950935
@@ -1037,7 +1022,6 @@ def __call__(self, environ, start_response):
10371022with_newrelic_agent = %(with_newrelic_agent)s
10381023newrelic_config_file = '%(newrelic_config_file)s'
10391024newrelic_environment = '%(newrelic_environment)s'
1040- with_wdb = %(with_wdb)s
10411025reload_on_changes = %(reload_on_changes)s
10421026debug_mode = %(debug_mode)s
10431027enable_debugger = %(enable_debugger)s
@@ -1087,8 +1071,7 @@ def output_profiler_data():
10871071handler = mod_wsgi.server.ApplicationHandler(entry_point,
10881072 application_type=application_type, callable_object=callable_object,
10891073 mount_point=mount_point, with_newrelic_agent=with_newrelic_agent,
1090- with_wdb=with_wdb, debug_mode=debug_mode,
1091- enable_debugger=enable_debugger)
1074+ debug_mode=debug_mode, enable_debugger=enable_debugger)
10921075
10931076reload_required = handler.reload_required
10941077handle_request = handler.handle_request
@@ -1203,36 +1186,6 @@ def generate_server_metrics_script(options):
12031186 with open (path , 'w' ) as fp :
12041187 print (SERVER_METRICS_SCRIPT % options , file = fp )
12051188
1206- WDB_SERVER_SCRIPT = """
1207- from wdb_server import server
1208- try:
1209- from wdb_server.sockets import handle_connection
1210- except ImportError:
1211- from wdb_server.streams import handle_connection
1212-
1213- from tornado.ioloop import IOLoop
1214- from tornado.options import options
1215- from tornado.netutil import bind_sockets, add_accept_handler
1216- from threading import Thread
1217-
1218- def run_server():
1219- ioloop = IOLoop.instance()
1220- sockets = bind_sockets(options.socket_port)
1221- for socket in sockets:
1222- add_accept_handler(socket, handle_connection, ioloop)
1223- server.listen(options.server_port)
1224- ioloop.start()
1225-
1226- thread = Thread(target=run_server)
1227- thread.setDaemon(True)
1228- thread.start()
1229- """
1230-
1231- def generate_wdb_server_script (options ):
1232- path = os .path .join (options ['server_root' ], 'wdb-server.py' )
1233- with open (path , 'w' ) as fp :
1234- print (WDB_SERVER_SCRIPT , file = fp )
1235-
12361189WSGI_CONTROL_SCRIPT = """
12371190#!/bin/sh
12381191
@@ -1747,10 +1700,6 @@ def check_percentage(option, opt_str, value, parser):
17471700 default = '' , help = 'Specify the name of the environment section '
17481701 'that should be used from New Relic agent configuration file.' ),
17491702
1750- optparse .make_option ('--with-wdb' , action = 'store_true' , default = False ,
1751- help = 'Flag indicating whether the wdb interactive debugger '
1752- 'should be enabled for the WSGI application.' ),
1753-
17541703 optparse .make_option ('--with-php5' , action = 'store_true' , default = False ,
17551704 help = 'Flag indicating whether PHP 5 support should be enabled.' ),
17561705
@@ -2232,9 +2181,6 @@ def _cmd_setup_server(command, args, options):
22322181 if options ['with_newrelic_platform' ]:
22332182 generate_server_metrics_script (options )
22342183
2235- if options ['with_wdb' ]:
2236- generate_wdb_server_script (options )
2237-
22382184 generate_apache_config (options )
22392185 generate_control_scripts (options )
22402186
0 commit comments