After my yesterday's question (Continuous WebJobs and CancellationToken) I thought now I've understand the handling of continuous WebJobs and graceful shutdown and did some testing.
Additional Info
With https://myWebJob.scm.azurewebsites.net/api/continuouswebjobs
I get:
{
[some info ommited...]
"type": "continuous",
"error": null,
"using_sdk": true,
"settings": {
"stopping_wait_time": 120
}
}
At Thu, 31 Dec 2015 07:00:23 GMT I put a Stop to the Server, the following entries in the Dash Board are:
[12/31/2015 07:00:23 > d71f29: SYS INFO] Status changed to Disabling [12/31/2015 07:00:28 > d71f29: SYS INFO] Detected WebJob file/s were updated, refreshing WebJob [12/31/2015 07:00:28 > d71f29: SYS INFO] Status changed to Stopping [12/31/2015 07:00:30 > d71f29: INFO] Job host stopped [12/31/2015 07:00:32 > d71f29: SYS INFO] Status changed to Success [12/31/2015 07:00:32 > d71f29: SYS INFO] Status changed to Stopped
And my running job ends at once without any further information. The last two lines of code of my function are the logging to the dashboard and writing an entry into a storage table. None of these entries are written... I've retried several times and everytime within 5 seconds the Job host stops. So:
Question
Is the "stopping_wait_time" value gracefully ignored for continuous WebJobs?