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,
|
"event": event,
|
||||||
"data": data
|
"data": data
|
||||||
}
|
}
|
||||||
|
print(json)
|
||||||
return requests.post(config.OSD_URL, json=json)
|
return requests.post(config.OSD_URL, json=json)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
data = requests.get(config.CAR_API_URL)
|
data = requests.get(config.CAR_API_URL)
|
||||||
for plugin in plugins:
|
for plugin in plugins:
|
||||||
plugin.check(data, emit)
|
plugin.check(data.json(), emit)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user