hub.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. import sys
  2. import importlib
  3. sys.path.append('../sri-pysdk')
  4. methods = importlib.import_module(f"xlib")
  5. class Global(object):
  6. """
  7. """
  8. # --- 公司内网测试服务器 ---
  9. save_dir = r'C:\logs' # sri内网测试环境
  10. emqx_factory = importlib.import_module(f"xclient.xmqtt")
  11. emqx_host = '127.0.0.1'
  12. emqx_port = 41883
  13. # --- 湛江现场 ----
  14. # save_dir = r'E:\logs' # 容量为512G
  15. # emqx_factory = importlib.import_module(f"xclient.xmqtt")
  16. # emqx_host = '127.0.0.1'
  17. # emqx_port = 41881
  18. # --- 定时执行组件 ---
  19. aps = importlib.import_module(f"xpip.xapscheduler").APS(db_type='mongo',
  20. db_host='127.0.0.1',
  21. db_port=47017,
  22. username='admin', password='admin',
  23. database='bg', collection='LoopTask')
  24. # --- 业务数据数据库 ---
  25. mdb = importlib.import_module(f"xclient.xmongo").Client(host='127.0.0.1', port=47017, database='bg',
  26. username='admin', password='admin')