我在我的 Visual Studio 中的 Azure 函数中创建了一个计时器触发器,如下所示,并将其部署在 Azure 门户中。一旦我尝试执行代码+测试,它就会给我输出为 HTTP 响应代码:202 Accepted HTTP response content(它显示为空白)
__init__.py
import os
import json
import logging
import requests
import numpy as np
import pandas as pd
import azure.functions as func
import azure.storage.blob
from azure.storage.blob import BlockBlobService
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
execute_timer() # This function is business logic and basically it saves CSV file in a container BLOB.
function.json
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 * * * * *"
}
]
}
当我部署并运行它时。它给了我 202 被接受,但我看不到我的输出生成或它被安排。
谁能帮我解决这个问题。