本文整理汇总了Python中cache.CacheHelper.cacheClean方法的典型用法代码示例。如果您正苦于以下问题:Python CacheHelper.cacheClean方法的具体用法?Python CacheHelper.cacheClean怎么用?Python CacheHelper.cacheClean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cache.CacheHelper
的用法示例。
在下文中一共展示了CacheHelper.cacheClean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set
# 需要导入模块: from cache import CacheHelper [as 别名]
# 或者: from cache.CacheHelper import cacheClean [as 别名]
# when --purge set delete cc_queue's as well
# as seriesly db
if "--purge" in sys.argv:
queues = set(CacheHelper.queues())
# cleaning up seriesly database (fast and slow created by cbtop)
if cfg.SERIESLY_IP != '':
from seriesly import Seriesly
seriesly = Seriesly(cfg.SERIESLY_IP, 3133)
dbs = seriesly.list_dbs()
for db in dbs:
seriesly.drop_db(db)
seriesly.create_db('event')
for q_ in queues:
try:
RabbitHelper().delete(q_)
print "Cleanup Queue: %s" % q_
except Exception as ex:
pass
# clean up cache
CacheHelper.cacheClean()
# start sdk server
os.system("python sdkserver.py &")