def wsgi_app(self, environ, start_response): assert request.request_timeout == 110 registered = signal.getsignal(signal.SIGALRM) assert callable(registered) assert registered.__name__ == "handle_request_timeout" assert signal.alarm(123) != 0 timeout_manager.disable_timeout() assert signal.alarm(0) == 0
def initialize_environment(self): # setup logging log.init_logging() # NOTE: We run in a subprocess! self._logger = log.logger.getChild("background-job") self._log_path_hint = _( "More information can be found in ~/var/log/web.log") # Disable html request timeout if timeout_manager: timeout_manager.disable_timeout() # Close livestatus connections inherited from the parent process sites.disconnect() super().initialize_environment()