Hi.
I have an Azure Function that is triggered by a CosmosDB document insertion/update. When I run the function, it always captures the same item/document and runs from there. The continuation token in the leases container does not update. I thought if the function processes a certain document, it stores a checkpoint of that and knows where to continue from. Why is my function not doing that?
I have two function.json files (two functions), with each listening to a container but basically go through the same logic. I only have an input binding which is the CosmosDB trigger, and each has a different lease container. No output binding as I use the Cosmos client to upsert items into new containers I created in the same DB. I'm running my code locally in VSCode with python.
The function.json (the other is the same but with a different collectionName and leasesCollectionName):
{
"scriptFile": "__init__.py",
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "docs",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "cosmostest_DOCUMENTDB",
"databaseName": "db-test",
"collectionName": "collection-one",
"createLeaseCollectionIfNotExists": true
}
}
Any help would be appreciated.