Commit c8390b3e authored by Alex Barceló's avatar Alex Barceló
Browse files

somebody will eventually demand the type for TrafficLight; let's add it and scream test it

parent 231f0f2a
......@@ -949,12 +949,13 @@ class TrafficLight(DataClayObject, KafkaMixin):
@dclayMethod(return_='str')
def __repr__(self):
return f"Traffic light: [id={self.id}, longitude={self.longitude}, latitude={self.latitude}, status={self.status}, timestamp={self.timestamp}]"
return f"Traffic light: [id={self.id}, type={self.type}, longitude={self.longitude}, latitude={self.latitude}, status={self.status}, timestamp={self.timestamp}]"
@dclayMethod(kafka_topic='str', station='str')
def send_to_kafka(self, kafka_topic, station):
tf_values = {}
tf_values["id"] = self.id
tf_values["type"] = self.type
tf_values["longitude"] = self.longitude
tf_values["latitude"] = self.latitude
tf_values["status"] = self.status
......
Supports Markdown
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