You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

agent.py 751B

  1. import fixer
  2. import os
  3. from core import Agent
  4. from configparser import ConfigParser
  5. __version__ = "0.3.0"
  6. environments_object = ConfigParser()
  7. environments_object.read("/opt/sixfab/.env")
  8. pms_environments = environments_object["pms"]
  9. configs = {
  10. "version": __version__,
  11. "feeder_interval": int(pms_environments.get("INTERVAL", 10)),
  12. "experimental_enabled": True if pms_environments.get("EXPERIMENTAL", False) == "True" else False,
  13. "environments": pms_environments,
  14. "environments_object": environments_object,
  15. "firmware_update_repository": "https://git.sixfab.com/sixfab-power/firmwares.git"
  16. }
  17. if __name__ == "__main__":
  18. agent = Agent(
  19. pms_environments["TOKEN"],
  20. configs=configs
  21. )
  22. agent.loop()