예제 #1
0
    def get_page(self):
        server = get_server(self, 'normal')
        self.application.http_client_factory.register_upstream(
            'no_available_backend', {}, [server])
        server.is_active = False

        def check_requests_cb():
            check_all_requests_done(self, 'no_available_backend')

        async_group = AsyncGroup(check_requests_cb)

        def callback_post(text, response):
            if response.error and response.code == 502:
                self.text = 'no backend available'
                return

            self.text = text

        self.post_url('no_available_backend',
                      self.request.path,
                      callback=async_group.add(callback_post))
        check_all_requests_done(self, 'no_available_backend')
예제 #2
0
 def check_requests_cb():
     check_all_requests_done(self, 'no_retry_timeout')
예제 #3
0
 def check_requests_cb():
     check_all_requests_done(self, 'no_available_backend')
예제 #4
0
 def check_requests_cb():
     check_all_requests_done(self, 'retry_non_idempotent_503')
     check_all_requests_done(self, 'do_not_retry_non_idempotent_503')
예제 #5
0
 def check_requests_cb():
     check_all_requests_done(self, 'no_retry_error')
예제 #6
0
 def check_requests_cb():
     check_all_requests_done(self, 'retry_on_timeout')
예제 #7
0
 def check_requests_cb():
     check_all_requests_done(self, 'no_retry_error')
예제 #8
0
 def check_requests_cb():
     check_all_requests_done(self, 'retry_connect')
예제 #9
0
        def check_server_active():
            if server.is_active:
                self.text += ' activated'

            check_all_requests_done(self, 'deactivate')
예제 #10
0
파일: deactivate.py 프로젝트: hhru/frontik
        def check_server_active():
            if server.is_active:
                self.text += ' activated'

            check_all_requests_done(self, 'deactivate')
예제 #11
0
 def check_requests_cb():
     check_all_requests_done(self, 'retry_connect')
예제 #12
0
 def check_requests_cb():
     check_all_requests_done(self, 'retry_non_idempotent_503')
     check_all_requests_done(self, 'do_not_retry_non_idempotent_503')