Exemplo n.º 1
0
 def __init__(self, zmq_export):
     self.socket = push_proxy_async(zmq_export)
Exemplo n.º 2
0
 def __init__(self, zmq_export):
     self.socket = push_proxy_async(zmq_export)
Exemplo n.º 3
0
        log.err()
        raise e

    engine = Engine()
    administrator_export = AdministratorExport(engine)
    accountant_port = config.getint("engine", "accountant_base_port") + contract.id

    administrator_port = config.getint("engine", "administrator_base_port") + contract.id
    router_share_async(administrator_export, "tcp://127.0.0.1:%d" % administrator_port)

    logger = LoggingListener(engine, contract)
    accountant = accountant.AccountantProxy("push",
                                            config.get("accountant", "engine_export"),
                                            config.getint("accountant", "engine_export_base_port"))
    accountant_notifier = AccountantNotifier(engine, accountant, contract)
    webserver = push_proxy_async(config.get("webserver", "engine_export"))
    webserver_notifier = WebserverNotifier(engine, webserver, contract)


    watchdog(config.get("watchdog", "engine") %
             (config.getint("watchdog", "engine_base_port") + contract.id))

    forwarder = connect_publisher(config.get("safe_price_forwarder", "zmq_frontend_address"))

    safe_price_notifier = SafePriceNotifier(session, engine, accountant, webserver, forwarder, contract)
    accountant_export = AccountantExport(engine, safe_price_notifier, webserver_notifier)
    router_share_async(accountant_export, "tcp://127.0.0.1:%d" % accountant_port)

    engine.add_listener(logger)
    engine.add_listener(accountant_notifier)
    engine.add_listener(webserver_notifier)