Azure webjob - gracefully disabling the queue processing function

I have a bunch of webjob queue processing functions:

public static void ProcessSomething( [QueueTrigger("testrequest")] TestThing thing, TextWriter logger, CancellationToken token) 

I am confused about the graceful shutdown. That way - when you complete the webjob (or redeploy on it), it allows you to currently process the webjob to start and end - by default, your queue handler has 5 seconds to complete. You can pass a CancellationToken to a method to check for a cancellation request if it is likely that your website will take longer, as described in the "Graceful Completion" section of this article .

Ok, but what is strange is that I found that when the queue handler is started during shutdown, the token has the value IsCancellationRequested , but even if the function ends inside, say, a second, then this queue element is marked as "Never Finished", and after 10 minutes (after the lease expiration for this queue) he returns to the queue.

Is it for design? Can I change this behavior? If, for example, your queue handler sent an email and he shot during shutdown, then he will send an email and then be flagged as never ending, and then send the email again after 10 minutes.

Help!

+7
azure azure-webjobs
source share

No one has answered this question yet.

See similar questions:

5
What happens to running processes on a continuous Azure WebJob when a website is redistributed?

or similar:

141
Azure Webjobs vs Azure Features: How to Choose
33
How to set Azure WebJob queue name at runtime?
5
Graceful completion of Azure WebJobs
5
What happens to running processes on a continuous Azure WebJob when a website is redistributed?
4
Running Azure WebJob out of turn
2
Azure Continuous WebJob "Graceful" shutdown is less than 5 seconds
one
GraceFul ShutDown in Azure Webjob in C #
0
Find out when the last message in the Azure Queue has been deleted
0
Shutting down a web job in a ServiceBusTrigger function in the Azure Webjobs SDK v3
0
Webjob errors after migrating to Azure Sql v12

All Articles