hub.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. save_dir = r'C:\logs' # sri内网测试环境
  9. # save_dir = r'E:\logs' # 湛江现场环境(容量为512G)
  10. # --- 中间件服务器 ---
  11. emqx_factory = importlib.import_module(f"xclient.xmqtt")
  12. emqx_host = '127.0.0.1'
  13. emqx_port = 41883
  14. # --- 定时执行组件 ---
  15. aps = importlib.import_module(f"xpip.xapscheduler").APS(db_type='mongo',
  16. db_host='127.0.0.1',
  17. db_port=47017,
  18. username='admin', password='admin',
  19. database='bg', collection='LoopTask')
  20. # --- 业务数据数据库 ---
  21. mdb = importlib.import_module(f"xclient.xmongo").Client(host='127.0.0.1', port=47017, database='bg',
  22. username='admin', password='admin')
  23. # emqx = importlib.import_module(f"xclient.xmqtt").Client(host='10.10.10.73', port=41883)
  24. # aps = importlib.import_module(f"xpip.xapscheduler").APS(db_type='mongo',
  25. # db_host='10.10.10.73',
  26. # db_port=47017,
  27. # username='admin', password='admin',
  28. # database='bg', collection='LoopTask')