提交 d27ed8e5 作者: 薛凌堃

东方财富网财务数据维护

上级 838272fc
"""
"""
......@@ -465,14 +465,15 @@ def job(taskType):
social_code = baseCore.redicPullData('FinanceFromEast:finance_socialCode')
# social_code = '91420300178856869P'
# 判断 如果Redis中已经没有数据,则等待
log.info(f'==========正在采集{social_code}============')
if social_code == None:
if social_code == None or social_code == 'None':
log.info('======已没有数据==========等待=====')
time.sleep(20)
if flag == 0:
pass
continue
elif flag == 1:
time.sleep(5400)
url_ = 'http://114.115.236.206:8088/sync/finance/calculateIndex?type=1'
log.info('=============调用对比指标接口======')
url_ = 'http://114.115.236.206:8088/sync/calculateIndex?type=1'
for nnn in range(0, 3):
try:
res_ = requests.get(url_)
......@@ -481,7 +482,7 @@ def job(taskType):
time.sleep(1)
print(res_.text)
continue
log.info(f'==========正在采集{social_code}============')
sql_sel = f'''select securities_code,exchange from sys_base_enterprise_ipo where category = '1' and social_credit_code='{social_code}' '''
cursor.execute(sql_sel)
row = cursor.fetchone()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论