Log emits. Pass json response instead of response object
This commit is contained in:
parent
a937679b23
commit
23d9e306b7
|
@ -11,12 +11,13 @@ def emit(event, data):
|
|||
"event": event,
|
||||
"data": data
|
||||
}
|
||||
print(json)
|
||||
return requests.post(config.OSD_URL, json=json)
|
||||
|
||||
def main():
|
||||
data = requests.get(config.CAR_API_URL)
|
||||
for plugin in plugins:
|
||||
plugin.check(data, emit)
|
||||
plugin.check(data.json(), emit)
|
||||
|
||||
if __name__ == "__main__":
|
||||
while True:
|
||||
|
|
Loading…
Reference in New Issue