def run(self):
        while True:
            try:
                sleep(settings.CHAT_TIME_SLEEP_THREAD)
                listeners = get_memcached(get_key("listeners"))
                for user in listeners.keys():
                    time = datetime.now() - listeners[user]['datetime']
                    if time.seconds > settings.CHAT_TIMEOUT:
                        del listeners[user]
                set_memcached(get_key("listeners"), listeners)
            except:
                print "error: ", sys.exc_info()
dataset/ETHPy150Open treeio/treeio/treeio/core/middleware/chat.py/Search_Inactive_Users.run/original