Give option for only crawling some boards
This commit is contained in:
parent
ebaf8c765d
commit
0ab67becff
|
@ -25,6 +25,9 @@ CRAWL_DELAY = int(getenv("MONOLITH_CH4_CRAWL_DELAY", 5))
|
|||
# Semaphore value ?
|
||||
THREADS_SEMAPHORE = int(getenv("MONOLITH_CH4_THREADS_SEMAPHORE", 1000))
|
||||
|
||||
# Boards to crawl
|
||||
BOARDS = getenv("MONOLITH_CH4_BOARDS", "").split(",")
|
||||
|
||||
# CONFIGURATION END #
|
||||
|
||||
|
||||
|
@ -58,7 +61,10 @@ class Chan4(object):
|
|||
self.log.debug(f"Decoded hash key: {self.hash_key}")
|
||||
|
||||
async def run(self):
|
||||
if not BOARDS:
|
||||
await self.get_board_list()
|
||||
else:
|
||||
self.boards = BOARDS
|
||||
while True:
|
||||
await self.get_thread_lists(self.boards)
|
||||
await asyncio.sleep(CRAWL_DELAY)
|
||||
|
|
Loading…
Reference in New Issue