Part of lp.services.sitesearch
Class | RequestHandler | Return a file depending on the requested URL. |
Function | url_to_file_map | Return our URL-to-file mapping as a dictionary. |
Function | service_is_available | Return True if the service is up and running. |
Function | wait_for_service | Poll the service and BLOCK until we can connect to it. |
Function | wait_for_service_shutdown | Poll the service until it shuts down. |
Function | hostpair | Parse the host and port number out of a URL string. |
Function | start_as_process | Run this file as a stand-alone Python script. |
Function | kill_running_process | Find and kill any running web service processes. |
Parameters | timeout | BLOCK execution for at most 'timeout' seconds before returning False. |
Parameters | timeout | The socket should timeout after this many seconds. Refer to the socket module documentation in the Standard Library for possible timeout values. |
Raises a RuntimeError if the service doesn't shut down within the allotted time, under normal operation. It may also raise various socket errors if there are issues connecting to the service (host lookup, etc.)
Parameters | seconds_to_wait | The number of seconds to wait for the socket to open up. |