hub.py 1009 B

123456789101112131415161718192021
  1. import sys
  2. import importlib
  3. sys.path.append('../module-py')
  4. methods = importlib.import_module(f"xlib")
  5. class Global(object):
  6. # --- 中间件服务器 ---
  7. mdb = importlib.import_module(f"xclient.xmongo").Client(host='192.168.131.23', port=7030, database='hs',
  8. username='admin', password='admin')
  9. mq01 = importlib.import_module(f"xclient.xmqtt").Client(host='192.168.131.23', port=41883)
  10. mq02 = importlib.import_module(f"xclient.xmqtt").Client(host='192.168.131.23', port=41883)
  11. # --- 插件 ---
  12. aps = importlib.import_module(f"xpip.xapscheduler").APS(db_type='mongo',
  13. db_host='192.168.131.23',
  14. db_port=7030,
  15. username='admin', password='admin',
  16. database='hs', collection='LoopTask')