File indexing completed on 2026-04-20 07:59:01
0001 import logging
0002 import sys
0003
0004 from pandaharvester.harvesterbody.cacher import Cacher
0005 from pandaharvester.harvestercore.communicator_pool import CommunicatorPool
0006 from pandaharvester.harvestercore.db_proxy_pool import DBProxyPool as DBProxy
0007
0008 for loggerName, loggerObj in logging.Logger.manager.loggerDict.items():
0009 if loggerName.startswith("panda.log"):
0010 if len(loggerObj.handlers) == 0:
0011 continue
0012 if loggerName.split(".")[-1] not in ["cacher"]:
0013 continue
0014 stdoutHandler = logging.StreamHandler(sys.stdout)
0015 stdoutHandler.setFormatter(loggerObj.handlers[0].formatter)
0016 loggerObj.addHandler(stdoutHandler)
0017
0018 proxy = DBProxy()
0019 communicator = CommunicatorPool()
0020
0021 cacher = Cacher(communicator, single_mode=True)
0022 cacher.execute(force_update=True, skip_lock=True)