コード例 #1
0
ファイル: testserver.py プロジェクト: Mapotempo/omim
 def start_serving(self):
     if not self.may_serve:
         return
     
     if USE_TORNADO:
         MainHandler.start_serving()
         
     else:
         thread = threading.Thread(target=self.server.serve_forever)
         thread.deamon = True
         thread.start()
コード例 #2
0
ファイル: testserver.py プロジェクト: rawder/organicmaps
 def start_serving(self):
     if not self.may_serve:
         return
     
     if USE_TORNADO:
         MainHandler.start_serving()
         
     else:
         thread = threading.Thread(target=self.server.serve_forever)
         thread.deamon = True
         thread.start()
コード例 #3
0
ファイル: testserver.py プロジェクト: Mapotempo/omim
    def init_server(self):
        
        if USE_TORNADO:
            MainHandler.init_server(PORT, LIFESPAN)
        else:
            print("""
*************
WARNING: Using the python's built-in BaseHTTPServer!
It is all right if you run the tests on your local machine, but if you are running tests on a server, 
please consider installing Tornado. It is a much more powerful web-server. Otherwise you will find
that some of your downloader tests either fail or hang.

do 

sudo pip install tornado

or go to http://www.tornadoweb.org/en/stable/ for more detail.
*************
""")
            
            self.server = InternalServer(('localhost', PORT), PostHandler)
コード例 #4
0
ファイル: testserver.py プロジェクト: rawder/organicmaps
    def init_server(self):
        
        if USE_TORNADO:
            MainHandler.init_server(PORT, LIFESPAN)
        else:
            print("""
*************
WARNING: Using the python's built-in BaseHTTPServer!
It is all right if you run the tests on your local machine, but if you are running tests on a server, 
please consider installing Tornado. It is a much more powerful web-server. Otherwise you will find
that some of your downloader tests either fail or hang.

do 

sudo pip install tornado

or go to http://www.tornadoweb.org/en/stable/ for more detail.
*************
""")
            
            self.server = InternalServer(('localhost', PORT), PostHandler)