1 Star 0 Fork 230

asdafewzx / StockAnalysisSystem

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main_service.py 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
import os
import time
import traceback
import StockAnalysisSystem.core.api as sasApi
from StockAnalysisSystem.core.config import Config
# ----------------------------------------------------------------------------------------------------------------------
def init_sas(work_path: str, config: Config or None) -> bool:
try:
print('Init StockAnalysisSystem...')
from StockAnalysisSystem.interface.interface_local import LocalInterface
__sas_interface = LocalInterface()
__sas_interface.if_init(project_path=work_path, config=config)
print('Init StockAnalysisSystem Complete.')
return True
except Exception as e:
print(str(e))
print(str(traceback.format_exc()))
print('Init StockAnalysisSystem Fail')
return False
finally:
pass
def main():
if not init_sas(os.getcwd(), None):
exit(1)
while True:
# TODO: Add something?
time.sleep(1)
if __name__ == '__main__':
try:
main()
except Exception as e:
print('Error =>', e)
print('Error =>', traceback.format_exc())
exit()
finally:
pass
Python
1
https://gitee.com/paqcom/StockAnalysisSystem.git
git@gitee.com:paqcom/StockAnalysisSystem.git
paqcom
StockAnalysisSystem
StockAnalysisSystem
master

搜索帮助