本文整理汇总了Python中BasicData.isHoliday方法的典型用法代码示例。如果您正苦于以下问题:Python BasicData.isHoliday方法的具体用法?Python BasicData.isHoliday怎么用?Python BasicData.isHoliday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicData
的用法示例。
在下文中一共展示了BasicData.isHoliday方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: import BasicData [as 别名]
# 或者: from BasicData import isHoliday [as 别名]
bd.updateMasterDate("LAST_UPDATED_DATE", last_updated_date, stock_code_163)
logger.info("LAST DATE UPDATED")
if str(index_indicator) == "1":
rf = bd.getRecoveryFactor(stock_code_163, stock_code_sina, start_date)
bd.insertRecoveryFactor(stock_code, rf)
logger.info("INSERT RF DATA COMPLETED")
else:
logger.error("NO DATA IS RECEIVED FROM 163")
result_set = dbu.query(sql)
if len(result_set) > 0:
logger.info("NOT ALL STOCKS ARE UPDATED, WAIT 10 MINUTES FOR NEXT UPDATE")
tm.sleep(10*60)
return "COMPLETED"
if __name__ == '__main__':
end_date = date.today()
if bd.isHoliday(du.convertDateToString(end_date, "%Y-%m-%d")) == "W":
logger.info("TODAY IS WORKING DAY, CONTINUE")
if smartUpdate(end_date) == "COMPLETED":
bd.callTechUpdateProc()
logger.info("CALL PROC TO UPDATE TECH DATA")
tm.sleep(60*5)
sa.analyzeAllStocks(end_date)
logger.info("ANALYSIS COMPLETE")
else:
logger.info("PROGRAM EXITS BECAUSE OF HOLIDAY")