config.py 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. import os
  4. configs = {
  5. "rabbitmq_config": {"username": os.getenv("USERNAME_RM", "guest"),
  6. "password": os.getenv("PASSWORD_RM", "ntRbt_+dgd8"),
  7. "host": os.getenv("HOST_RM", "39.105.175.99"),
  8. "port": os.getenv("PORT_RM", 5672),
  9. "virtual_host": os.getenv("VIRTUAL_HOST_RM", "/"),
  10. "exchange_type": os.getenv("EXCHANGE_TYPE", "direct"),
  11. "exchange_get": os.getenv("EXCHANGE_GET", "sem.server.exchange"),
  12. "queue_name_get": os.getenv("QUEUE_NAME_GET", "sem.server.queue.chillertemp.input"),
  13. "routing_key_get": os.getenv("ROUTING_KEY_GET", "chillertemp.input"),
  14. "exchange_send": os.getenv("EXCHANGE_SEND", "sem.server.exchange"),
  15. "queue_name_send": os.getenv("QUEUE_NAME_SEND", "sem.server.queue.chillertemp.output"),
  16. "routing_key_send": os.getenv("ROUTING_KEY_SEND", "chillertemp.output")},
  17. "rocketmq_config": {
  18. "access_key": os.getenv("ROCKET_USER", "test"),
  19. "access_secret": os.getenv("ROCKET_PASSWD", "test"),
  20. "host": os.getenv("ROCKET_HOST_ADDR","http://192.168.1.70:9876"),
  21. # "host": os.getenv("ROCKET_HOST_ADDR", "http://172.17.102.51:9876"),
  22. # 水温算法 触发主题
  23. "topic_chiller_temp_in": os.getenv("TOPIC_CHILLER_TEMP_IN", "alg-request"),
  24. "tag_chiller_temp_in": os.getenv("TAG_CHILLER_TEMP_IN", "alg-chiller-req"),
  25. # 水温算法 响应主题
  26. "topic_chiller_temp_out": os.getenv("TOPIC_CHILLER_TEMP_OUT", "alg-response"),
  27. "tag_chiller_temp_out": os.getenv("TAG_CHILLER_TEMP_OUT", "alg-chiller-resp"),
  28. }
  29. }
  30. mysql_configs = {
  31. "em_embasic": {"host": os.getenv("MYSQL_HOST", "hdc-emm-external.rwlb.rds.aliyuncs.com"),
  32. "port": os.getenv("MYSQL_PORT", "3306"),
  33. "user": os.getenv("MYSQL_USER", "readonly_chiller"),
  34. "password": os.getenv("MYSQL_PASSWORD", "xafnTU5j"),
  35. "db": os.getenv("MYSQL_DB_EMBASIC", "em_embasic"),
  36. "charset": os.getenv("MYSQL_CHARSET", "utf8")},
  37. "em_bsem": {"host": os.getenv("MYSQL_HOST", "hdc-emm-external.rwlb.rds.aliyuncs.com"),
  38. "port": os.getenv("MYSQL_PORT", "3306"),
  39. "user": os.getenv("MYSQL_USER", "readonly_chiller"),
  40. "password": os.getenv("MYSQL_PASSWORD", "xafnTU5j"),
  41. "db": os.getenv("MYSQL_DB_EMBSEM", "em_bsem"),
  42. "charset": os.getenv("MYSQL_CHARSET", "utf8")}}