cubicweb/cwctl.py
changeset 12585 933c2b3839ab
parent 12567 26744ad37953
child 12685 84a8a8915512
--- a/cubicweb/cwctl.py	Fri Apr 12 12:31:14 2019 +0200
+++ b/cubicweb/cwctl.py	Fri Apr 12 02:26:28 2019 +0200
@@ -774,75 +774,6 @@
             appcfg.save()
 
 
-# WSGI #########
-
-WSGI_CHOICES = {}
-try:
-    from cubicweb.wsgi import server as stdlib_server
-except ImportError:
-    pass
-else:
-    WSGI_CHOICES['stdlib'] = stdlib_server
-try:
-    from cubicweb.wsgi import wz
-except ImportError:
-    pass
-else:
-    WSGI_CHOICES['werkzeug'] = wz
-try:
-    from cubicweb.wsgi import tnd
-except ImportError:
-    pass
-else:
-    WSGI_CHOICES['tornado'] = tnd
-
-
-def wsgichoices():
-    return tuple(WSGI_CHOICES)
-
-
-if WSGI_CHOICES:
-    class WSGIStartHandler(InstanceCommand):
-        """Start an interactive wsgi server """
-        name = 'wsgi'
-        actionverb = 'started'
-        arguments = '<instance>'
-
-        @property
-        def options(self):
-            return (
-                ("debug",
-                 {'short': 'D', 'action': 'store_true',
-                  'default': False,
-                  'help': 'start server in debug mode.'}),
-                ('method',
-                 {'short': 'm',
-                  'type': 'choice',
-                  'metavar': '<method>',
-                  'default': 'stdlib',
-                  'choices': wsgichoices(),
-                  'help': 'wsgi utility/method'}),
-                ('loglevel',
-                 {'short': 'l',
-                  'type': 'choice',
-                  'metavar': '<log level>',
-                  'default': None,
-                  'choices': ('debug', 'info', 'warning', 'error'),
-                  'help': 'debug if -D is set, error otherwise',
-                  }),
-            )
-
-        def wsgi_instance(self, appid):
-            config = cwcfg.config_for(appid, debugmode=self['debug'])
-            init_cmdline_log_threshold(config, self['loglevel'])
-            assert config.name == 'all-in-one'
-            meth = self['method']
-            server = WSGI_CHOICES[meth]
-            return server.run(config)
-
-    CWCTL.register(WSGIStartHandler)
-
-
 for cmdcls in (ListCommand,
                CreateInstanceCommand, DeleteInstanceCommand,
                UpgradeInstanceCommand,