예제 #1
0
def main(private_key: PrivateKey, state_db: str, matrix_server: List[str],
         accept_disclaimer: bool) -> int:
    """The request collector for the monitoring service."""
    log.info("Starting Raiden Monitoring Request Collector")
    click.secho(MS_DISCLAIMER, fg="yellow")
    if not accept_disclaimer:
        click.confirm(CONFIRMATION_OF_UNDERSTANDING, abort=True)
    if state_db != ":memory:" and not os.path.exists(state_db):
        log.error(
            "Database file from monitoring service not found. Is the monitoring service running?",
            expected_db_path=state_db,
        )
        sys.exit(1)

    database = SharedDatabase(state_db)

    service = RequestCollector(private_key=private_key,
                               state_db=database,
                               matrix_servers=matrix_server)

    service.start()
    service.listen_forever()

    print("Exiting...")
    return 0
예제 #2
0
def request_collector(ms_address, ms_database, get_private_key):
    with patch("request_collector.server.MatrixListener"):
        rc = RequestCollector(private_key=get_private_key(ms_address), state_db=ms_database)
        rc.start()
        yield rc
        rc.stop()
        rc.join()
예제 #3
0
def main(private_key: str, state_db: str) -> int:
    """ The request collector for the monitoring service. """
    log.info("Starting Raiden Monitoring Request Collector")

    database = SharedDatabase(state_db)

    service = RequestCollector(private_key=private_key, state_db=database)

    service.start()
    service.listen_forever()

    print("Exiting...")
    return 0
예제 #4
0
def request_collector(
    server_private_key,
    ms_database,
    web3,
    monitoring_service_contract,
    token_network_registry_contract,
    send_funds,
    contracts_manager: ContractManager,
):
    with patch('request_collector.server.MatrixListener'):
        rc = RequestCollector(private_key=server_private_key,
                              state_db=ms_database)
        rc.start()
        yield rc
        rc.stop()
        rc.join()
예제 #5
0
def request_collector(
    server_private_key,
    blockchain,
    dummy_transport,
    state_db_sqlite,
    web3,
    monitoring_service_contract,
    token_network_registry_contract,
    send_funds,
    contracts_manager: ContractManager,
):
    rc = RequestCollector(
        state_db=state_db_sqlite,
        transport=dummy_transport,
    )
    rc.start()
    yield rc
    rc.stop()
예제 #6
0
def main(private_key: str, state_db: str) -> int:
    """ The request collector for the monitoring service. """
    log.info("Starting Raiden Monitoring Request Collector")

    if state_db != ":memory:" and not os.path.exists(state_db):
        log.error(
            "Database file from monitoring service not found. Is the monitoring service running?",
            expected_db_path=state_db,
        )
        sys.exit(1)

    database = SharedDatabase(state_db)

    service = RequestCollector(private_key=private_key, state_db=database)

    service.start()
    service.listen_forever()

    print("Exiting...")
    return 0