|
@@ -8,6 +8,7 @@ import json
|
|
import queue
|
|
import queue
|
|
from threading import Thread
|
|
from threading import Thread
|
|
|
|
|
|
|
|
+from log import get_log
|
|
from handle.search_winhc_latest_date import search_latest_date
|
|
from handle.search_winhc_latest_date import search_latest_date
|
|
from handle.search_winhc_summary import search_summary
|
|
from handle.search_winhc_summary import search_summary
|
|
from sdk.WinhcAllClient import get_all_client
|
|
from sdk.WinhcAllClient import get_all_client
|
|
@@ -18,12 +19,19 @@ from project_const import TOPIC_NAME, MONGODB_NAME
|
|
|
|
|
|
all_client = get_all_client()
|
|
all_client = get_all_client()
|
|
col = all_client.get_mongo_collection(MONGODB_NAME)
|
|
col = all_client.get_mongo_collection(MONGODB_NAME)
|
|
|
|
+log = get_log('winhc_job')
|
|
|
|
|
|
|
|
|
|
def run(data: map):
|
|
def run(data: map):
|
|
company_id = data['company_id']
|
|
company_id = data['company_id']
|
|
- summary = search_summary(company_id)
|
|
|
|
- latest_date = search_latest_date(company_id)
|
|
|
|
|
|
+ try:
|
|
|
|
+ summary = search_summary(company_id)
|
|
|
|
+ latest_date = search_latest_date(company_id)
|
|
|
|
+ pass
|
|
|
|
+ except:
|
|
|
|
+ log.error('error company_id :{}'.format(company_id))
|
|
|
|
+ return
|
|
|
|
+ pass
|
|
|
|
|
|
_id = get_ds() + '_' + company_id + '_winhc'
|
|
_id = get_ds() + '_' + company_id + '_winhc'
|
|
|
|
|