def tearDown(self):
        # stop the thread timer
        try:
            self.container._v_timer.cancel()
            time.sleep(1)  # allow for thread cleanup
        except AttributeError:
            pass

        # we have an in-memory queue, purge it
        while True:
            try:
                STATUSQUEUE.get(block=False)
            except Queue.Empty:
                break
Ejemplo n.º 2
0
    def tearDown(self):
        # stop the thread timer
        try:
            self.container._v_timer.cancel()
            time.sleep(1)  # allow for thread cleanup
        except AttributeError:
            pass

        # we have an in-memory queue, purge it
        while True:
            try:
                STATUSQUEUE.get(block=False)
            except Queue.Empty:
                break
Ejemplo n.º 3
0
def tearDownContainer(container):
    from plonesocial.microblog.statuscontainer import STATUSQUEUE
    # stop the thread timer
    try:
        container._v_timer.cancel()
        time.sleep(1)  # allow for thread cleanup
    except AttributeError:
        pass

    # we have an in-memory queue, purge it
    while True:
        try:
            STATUSQUEUE.get(block=False)
        except Queue.Empty:
            break
Ejemplo n.º 4
0
def tearDownContainer(container):
    from plonesocial.microblog.statuscontainer import STATUSQUEUE

    # stop the thread timer
    try:
        container._v_timer.cancel()
        time.sleep(1)  # allow for thread cleanup
    except AttributeError:
        pass

    # we have an in-memory queue, purge it
    while True:
        try:
            STATUSQUEUE.get(block=False)
        except Queue.Empty:
            break