Ejemplo n.º 1
0
    def main():
        from stub.connection import TurnConnectionStub

        conn = TurnConnectionStub()
        gateway = TurnTelnetGateway(conn)
        for session in gateway.list_sessions():
            print session
        conn.close()
Ejemplo n.º 2
0
def main():
    from stub.connection import TurnConnectionStub
    conn = TurnConnectionStub()
    #conn = TurnTelnetConnection()
    gateway = TurnTelnetGateway(conn)
    session_dao = TurnSessionDao()

    service = TurnStatsService(gateway, session_dao)
    service.collect_session_stats()

    conn.close()