Event based webhooks (#296)

This commit is contained in:
bmc-msft
2020-11-12 17:44:42 -05:00
committed by GitHub
parent 693c988854
commit 31f099d3d4
24 changed files with 2133 additions and 35 deletions

View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import json
import azure.functions as func
from ..onefuzzlib.webhooks import WebhookMessageLog, WebhookMessageQueueObj
def main(msg: func.QueueMessage) -> None:
body = msg.get_body()
obj = WebhookMessageQueueObj.parse_obj(json.loads(body))
WebhookMessageLog.process_from_queue(obj)

View File

@ -0,0 +1,12 @@
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "msg",
"type": "queueTrigger",
"direction": "in",
"queueName": "webhooks",
"connection": "AzureWebJobsStorage"
}
]
}