def _stop(client, server): try: client.wait() except greenlet.GreenletExit: pass except Exception: greenthread.kill(server, *sys.exc_info())
def _eventlet_stop(client, server, beanstalk): try: try: client.wait() finally: beanstalk.close() except greenlet.GreenletExit: pass except Exception: greenthread.kill(server, *sys.exc_info())