Beispiel #1
0
def stop():
    from src import messages
    
    def callback():
        from src import db
        db.client.disconnect()
        ioloop.stop()
        
    ioloop.add_callback(callback)
    t.join()
    
    messages.stopped()
Beispiel #2
0
def stop():
    from src import messages

    @coroutine
    def callback():
        from controller import MSGHandler
        from src import db
        yield MSGHandler.stop()
        yield db.stop()
        ioloop.stop()

    ioloop.add_callback(callback)
    t.join()

    messages.stopped()
Beispiel #3
0
def stop():
    from src import messages

    @coroutine
    def callback():
        from controller import MSGHandler
        from src import db

        yield MSGHandler.stop()
        yield db.stop()
        ioloop.stop()

    ioloop.add_callback(callback)
    t.join()

    messages.stopped()
Beispiel #4
0
def stop():
    from src import messages

    # @coroutine
    def callback():
        """Stop application

        Here you can stop other services, like a database ;).
        Uncomment ``@coroutine`` if you want to yield futures
        in this function.
        """
        ioloop.stop()

    ioloop.add_callback(callback)
    t.join()

    messages.stopped()
Beispiel #5
0
def stop():
    from src import messages

    # @coroutine
    def callback():
        """Stop application

        Here you can stop other services, like a database ;).
        Uncomment ``@coroutine`` if you want to yield futures
        in this function.
        """
        ioloop.stop()

    ioloop.add_callback(callback)
    t.join()

    messages.stopped()