def accept_webhook():
try:
log.debug("POST request received from {}.".format(request.remote_addr))
data = json.loads(request.data)
if type(data) == dict: # older webhook style
data_queue.put(data)
else: # For RM's frame
for frame in data:
data_queue.put(frame)
except Exception as e:
log.error("Encountered error while receiving webhook ({}: {})".format(type(e).__name__, e))
abort(400)
return "OK" # request ok
# Thread used to distribute the data into various processes (for RocketMap format)
评论列表
文章目录