How to use the txzmq.ZmqRequestTimeoutError function in txZMQ

To help you get started, we’ve selected a few txZMQ examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leapcode / bitmask_client / src / leap / bitmask / cli / bitmask_cli.py View on Github external
def timeout_handler(failure, stop_reactor=True):
    # TODO ---- could try to launch the bitmask daemon here and retry

    if failure.trap(ZmqRequestTimeoutError) == ZmqRequestTimeoutError:
        print (Fore.RED + "[ERROR] Timeout contacting the bitmask daemon. "
               "Is it running?" + Fore.RESET)
        reactor.stop()
github leapcode / bitmask-dev / src / leap / bitmask / cli / command.py View on Github external
def _timeout_handler(self, failure, errb):
        if failure.trap(ZmqRequestTimeoutError) == ZmqRequestTimeoutError:
            if callable(errb):
                errb()
            else:
                print(Fore.RED + "[ERROR] Timeout contacting the bitmask "
                      "daemon. Is it running?" + Fore.RESET)
github leapcode / bitmask_client / src / leap / bitmask / cli / command.py View on Github external
def _timeout_handler(self, failure):
        # TODO ---- could try to launch the bitmask daemon here and retry
        if failure.trap(ZmqRequestTimeoutError) == ZmqRequestTimeoutError:
            print (Fore.RED + "[ERROR] Timeout contacting the bitmask daemon. "
                   "Is it running?" + Fore.RESET)