mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-14 02:58:10 +00:00
check change event type before container name (#1075)
This commit is contained in:
@ -29,10 +29,11 @@ def file_added(event: Dict, fail_task_on_transient_error: bool) -> None:
|
|||||||
def main(msg: func.QueueMessage, dashboard: func.Out[str]) -> None:
|
def main(msg: func.QueueMessage, dashboard: func.Out[str]) -> None:
|
||||||
event = json.loads(msg.get_body())
|
event = json.loads(msg.get_body())
|
||||||
last_try = msg.dequeue_count == MAX_DEQUEUE_COUNT
|
last_try = msg.dequeue_count == MAX_DEQUEUE_COUNT
|
||||||
if event["topic"] not in corpus_accounts():
|
# check type first before calling Azure APIs
|
||||||
|
if event["eventType"] != "Microsoft.Storage.BlobCreated":
|
||||||
return
|
return
|
||||||
|
|
||||||
if event["eventType"] != "Microsoft.Storage.BlobCreated":
|
if event["topic"] not in corpus_accounts():
|
||||||
return
|
return
|
||||||
|
|
||||||
file_added(event, last_try)
|
file_added(event, last_try)
|
||||||
|
Reference in New Issue
Block a user