out put in a specific topic

... to visualize some metrics
parent 9e159443
......@@ -19,7 +19,7 @@ from sesamelib.faust import BaseDynamicMessage
import faust
APP_NAME = "mutation"
APP_NAME = "ca1-015-csquare"
if __name__ == "__main__":
parser = argparse.ArgumentParser("Mutate the ais dynamic signal")
......@@ -50,6 +50,7 @@ if __name__ == "__main__":
topic = app.topic("ais.dynamic",
key_type=str,
value_type=BaseDynamicMessage)
out_topic = app.topic(APP_NAME)
pmsgs = {}
......@@ -66,8 +67,7 @@ if __name__ == "__main__":
y,
geometry))
if d <= 0.0:
# Let's do something simple for now: outputing nowhere
print("ca1_15 : in zone %s / %s" % (geometry.mrgid, msg))
await out_topic.send(key=str(msg.mmsi), value=msg)
app.finalize()
worker = faust.Worker(app,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment