You've already forked AiraPulsar
Improvement
This commit is contained in:
19
comet/comet.py
Normal file
19
comet/comet.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from lib import agency
|
||||
import yaml
|
||||
import time
|
||||
moon_addr = None
|
||||
moon_port = None
|
||||
|
||||
with open('comet_config.yaml', 'r') as config_file:
|
||||
config = yaml.safe_load(config_file)
|
||||
moon_addr = config.get("moon_addr", "127.0.0.1")
|
||||
port = config.get("moon_port", 8765)
|
||||
|
||||
agent = None
|
||||
|
||||
def handler(data: dict):
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
agent = agency.Agent(name="comet", addr=moon_addr, handler=handler)
|
||||
agent.runasthread()
|
||||
Reference in New Issue
Block a user