Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 1 column 43
---
Title: author Azure Function uses deferral: ongou_ye
date: 2017-12-14 url: /archives/2017-12-14-using-asyncawait-on-azure-function categories:
* Azure
---
The default Azure Funtion not async/await. The version of node.js is v6.5.0. It is, but you can use deferral in the Azure Funtion if you change settings. Freed from the hell of the callback.
However, this procedure is 12/15 use the preview feature at the time. Please note that.
change the settings of the following is required to use a deferral.
- Change the runtime version in Beta
- Change the environment variable 'WEBSITE_NODE_DEFAULT_VERSION' to the 8.5.0
V6.5.0's async point will fail.
When you switch to v8.5.0 interprets the deferral. part of the async error. to go to sleep and not await, wait for 10 seconds.
Reference: [in ES2017 async/await sleep to write the process] (https://qiita.com/asa-taka/items/888bc5a1d7f30ee7eda2)
go to sleep to await and wait 10 seconds. I'm async/await. Great!