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
Beispiel #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
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
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