Skip to content

Durable Azure Function that waits for three types of files and then processes them.

Notifications You must be signed in to change notification settings

eavanvalkenburg/azure_durable_function_waitforfilesandprocess

Repository files navigation

Azure Durable Function - Python sample

A set of python functions built on the preview that waits for three types of events, processes them, and finally writes them to CosmosDB. Triggered by Event Grid.

Client

The Client is the actual listener for events, it is triggered by an Event Grid Event, and uses the information in it to decide which instance this is and raises an event on that instance of a type that matches the incoming event.

Orchestrator

The orchestrator has the main logic, it creates three tasks for the three different event types and waits for the events associated with those, once all three events have taken place it starts the next two activities.

CombineFiles

This activity takes the completed set of files and sends a call to a external API that has the logic for combining the files, it returns that logic to the Orchestrator.

SendToCosmos

This activity takes the dict it gets and sends that to CosmosDB using the outgoing CosmosDB binding.