Log emits. Pass json response instead of response object

This commit is contained in:
Ceda EI 2020-12-21 18:12:29 +05:30
parent a937679b23
commit 23d9e306b7
1 changed files with 2 additions and 1 deletions

View File

@ -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: