当数据被添加到我指定绑定的队列时,没有激活我的队列触发器。我有另一个持久的函数,它接收一些JSON数据并将其放入队列中;我知道这是可行的,因为我可以使用存储资源管理器看到数据出现在队列中。但是,在数据到达队列后,我的队列触发器函数永远不会触发。
我知道它不会触发,因为在门户中总执行计数显示为0。
完整的函数很长,所以我将分享我认为最相关的部分:
namespace Company.MySpecial
{
public static class MySpecialQueueProcessor
{
[FunctionName("MySpecialQueueProcessor")]
public static async void Run([QueueTrigger("myspecialqueue")]String transdata,
// various table mappings edited out
ILogger log)
{
MySpecialItem Item = JsonConvert.DeserializeObject<MySpecialItem>(transdata);
log.LogInformation($"[GROOVE-QUEUE] {Item.email} Queue processor activated");
return;
}
}
}我有async,因为我需要调用一些需要await操作符的任务,它不允许我在没有async的情况下使用await。示例:
await MyData.AddAsync (Item);
并从表中检索数据:
do
{
var page = await GrooveProductMappings.ExecuteQuerySegmentedAsync(productQuery, ct);
ct = page.ContinuationToken;
Matches.AddRange(page.Results);
}
while (ct != null); 我不知道这是否是我问题的一部分。
我的代码有什么问题吗,或者我在Azure中没有做过的其他事情需要它才能工作呢?
发布于 2020-08-25 15:49:16
我有三个问题:
您还可以检查Application "Live“中的错误(如果您已经为您的函数配置了它)
https://stackoverflow.com/questions/63582285
复制相似问题