def _run_once(self):
try:
if self.settings.DO_INBOX or self.settings.DO_FALSEPOS:
await self._process_messages()
asyncio.sleep(5)
for multi in settings.MULTIREDDITS:
if self.settings.DO_OC:
asyncio.sleep(5)
await self._process_oc_stream(multi)
for multi in settings.MULTIREDDITS + [settings.PARENT_SUB]:
if self.settings.DO_MODLOG:
asyncio.sleep(5)
await self._process_network_modlog(multi)
except (HTTPException, requests.ReadTimeout,
requests.ConnectionError) as ex:
LOG.error('%s: %s', type(ex), ex)
else:
LOG.debug('All tasks processed.')
# ======================================================
评论列表
文章目录