mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Split off the Tornado code into a separate process
(imported from commit 95dbd0f438cdba06d6e6c6c539a2a3d49c577cfd)
This commit is contained in:
		@@ -84,14 +84,11 @@ class Command(BaseCommand):
 | 
			
		||||
            print "Tornado server is running at http://%s:%s/" % (addr, port)
 | 
			
		||||
            print "Quit the server with %s." % quit_command
 | 
			
		||||
 | 
			
		||||
            from tornado.web import FallbackHandler
 | 
			
		||||
            django_app = wsgi.WSGIContainer(WSGIHandler())
 | 
			
		||||
 | 
			
		||||
            try:
 | 
			
		||||
                # Application is an instance of Django's standard wsgi handler.
 | 
			
		||||
                application = web.Application([(r"/json/get_updates", AsyncDjangoHandler),
 | 
			
		||||
                                               (r"/api/v1/get_messages", AsyncDjangoHandler),
 | 
			
		||||
                                               (r".*", FallbackHandler, dict(fallback=django_app)),
 | 
			
		||||
                                               (r"/notify_waiting_clients", AsyncDjangoHandler),
 | 
			
		||||
                                               ], debug=django.conf.settings.DEBUG)
 | 
			
		||||
 | 
			
		||||
                # start tornado web server in single-threaded mode
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user