prepare for multi-node deployment

This commit is contained in:
Marvin Zhang
2019-02-26 13:00:06 +08:00
parent 6d2370f58b
commit cf1d1ca878
4 changed files with 28 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
import os
from constants.spider import FILE_SUFFIX_LANG_MAPPING, LangType, SUFFIX_IGNORE, SpiderType
@@ -16,4 +18,6 @@ def get_lang_by_stats(stats: dict) -> LangType:
def get_spider_type(path: str) -> SpiderType:
return SpiderType.SCRAPY
for file_name in os.listdir(path):
if file_name == 'scrapy.cfg':
return SpiderType.SCRAPY