| 121 | logging.info(f"Not allowed to start serving for process: {pid}") |
| 122 | |
| 123 | def init_server(self): |
| 124 | |
| 125 | if USE_TORNADO: |
| 126 | MainHandler.init_server(PORT, LIFESPAN) |
| 127 | else: |
| 128 | print(""" |
| 129 | ************* |
| 130 | WARNING: Using the python's built-in BaseHTTPServer! |
| 131 | It is all right if you run the tests on your local machine, but if you are running tests on a server, |
| 132 | please consider installing Tornado. It is a much more powerful web-server. Otherwise you will find |
| 133 | that some of your downloader tests either fail or hang. |
| 134 | |
| 135 | do |
| 136 | |
| 137 | sudo pip install tornado |
| 138 | |
| 139 | or go to http://www.tornadoweb.org/en/stable/ for more detail. |
| 140 | ************* |
| 141 | """) |
| 142 | |
| 143 | self.server = InternalServer(('localhost', PORT), PostHandler) |
| 144 | |
| 145 | |
| 146 | |