我正在尝试在azure中编写小型webjob代码,以便在将博客添加到容器时对blob文件的名称进行排队。我的作业主机正在启动,但在使用手动/编程方式添加blob时没有反应。我不知道如何调试它。我做了一些搜索,并按照建议等了10分钟,事实上我等了几个小时但没有运气。以下是日志
06/01/2015 18:19:11 > 1bb5b4: SYS INFO] Status changed to Starting
[06/01/2015 18:19:12 > 1bb5b4: SYS INFO] Run script 'WebJob1.exe' with script host - 'WindowsScriptHost'
[06/01/2015 18:19:12 > 1bb5b4: SYS INFO] Status changed to Running
[06/01/2015 18:19:13 > 1bb5b4: INFO] This is with blob
[06/01/2015 18:19:14 > 1bb5b4: INFO] Found the following functions:
[06/01/2015 18:19:14 > 1bb5b4: INFO] WebJob1.Functions.ProcessQueueMessage
[06/01/2015 18:19:14 > 1bb5b4: INFO] Job host started
Following is my code
public static void QueuePhoneForNewblob(
[BlobTrigger("myshop/{name}")] string input,
string name,
[Queue("myshop")] out string message)
{
message = name;
Console.WriteLine("hello world");
}
public static void ProcessQueueMessage([QueueTrigger("myshop")] string logMessage, TextWriter logger)
{
logger.WriteLine(logMessage);
}
答案 0 :(得分:0)
好的,我准备使用工作者角色并准备好一些脏代码;无论如何,我将我的触发器功能移动到了之前在program.cs
中的functions.cs文件中