Azure WebJobs 发布错误
Azure WebJobs publishing error
我们部署了一个带有生产槽和开发槽的 webapp,因为我们已经创建了几个 webjobs(连续的和计划的)并且我们想手动部署它们(不链接到 webapp 部署)所以我们遵循的部署过程是:
1 -> 部署 WebApp
2 -> 对于每个 WebJob:右键单击项目 + 部署为 Azure WebJob + Select 适当的插槽 + 发布
我们能够毫无问题地发布生产槽,但是当涉及到开发槽时,以下错误一遍又一遍地出现:
C:[...]\packages\Microsoft.Web.WebJobs.Publish.1.0.6\tools\webjobs.console.targets(110,5): 错误:创建时出错WebJob 计划:找不到与提供的 WebSiteName [slot__test] 和 WebSiteUrl [http://slot-test.azurewebsites.net]
匹配的网站
作为附加信息,我们正在使用 Visual Studio Pro 2013 Update 5 和 Azure SDK 2.7
编辑:
这个错误仍然发生在 1.0.10
版本中
看看这个博客post:http://blog.amitapple.com/post/2015/06/scheduling-azure-webjobs/
它会为您提供另一种部署计划 web 作业的选项,您所需要的只是每个计划 web 作业的 settings.job
文件,其中包含使用 cron 表达式描述的计划。
像这样:
{"schedule": "the schedule as a cron expression"}
然后你可以将 webjob delpoy 为 "Run on-Demand"(令人困惑,我知道)。
要查看网络作业的状态,请访问:https://{sitename}.scm.azurewebsites.net/api/webjobs
对于广告位,请访问:
https://{sitename}-{slotname}.scm.azurewebsites.net/api/webjobs
Note the schedule in this scenario is sticky to thesite, opposed to with the Azure scheduler where it is sticky to theslot, this means when you swap the slots, the schedule is swapped with the site so the schedule move from staging to production for example. More about slot stickyness can be found here
找到解决方案,将 Webjobs.Publish nuget 包从 1.0.6 降级到 1.0.3 后一切顺利。 MS 在发布与当前工具不匹配的包时应该更加小心,因为这不是我们第一次遇到这样的问题。
这听起来像是同一个问题:An error occurred while creating the WebJob schedule
对我来说,我在服务器资源管理器中连接到目标订阅 window。听起来这应该与发布无关,但它有效。
我们部署了一个带有生产槽和开发槽的 webapp,因为我们已经创建了几个 webjobs(连续的和计划的)并且我们想手动部署它们(不链接到 webapp 部署)所以我们遵循的部署过程是:
1 -> 部署 WebApp
2 -> 对于每个 WebJob:右键单击项目 + 部署为 Azure WebJob + Select 适当的插槽 + 发布
我们能够毫无问题地发布生产槽,但是当涉及到开发槽时,以下错误一遍又一遍地出现:
C:[...]\packages\Microsoft.Web.WebJobs.Publish.1.0.6\tools\webjobs.console.targets(110,5): 错误:创建时出错WebJob 计划:找不到与提供的 WebSiteName [slot__test] 和 WebSiteUrl [http://slot-test.azurewebsites.net]
匹配的网站作为附加信息,我们正在使用 Visual Studio Pro 2013 Update 5 和 Azure SDK 2.7
编辑: 这个错误仍然发生在 1.0.10
版本中看看这个博客post:http://blog.amitapple.com/post/2015/06/scheduling-azure-webjobs/
它会为您提供另一种部署计划 web 作业的选项,您所需要的只是每个计划 web 作业的 settings.job
文件,其中包含使用 cron 表达式描述的计划。
像这样:
{"schedule": "the schedule as a cron expression"}
然后你可以将 webjob delpoy 为 "Run on-Demand"(令人困惑,我知道)。
要查看网络作业的状态,请访问:https://{sitename}.scm.azurewebsites.net/api/webjobs
对于广告位,请访问: https://{sitename}-{slotname}.scm.azurewebsites.net/api/webjobs
Note the schedule in this scenario is sticky to thesite, opposed to with the Azure scheduler where it is sticky to theslot, this means when you swap the slots, the schedule is swapped with the site so the schedule move from staging to production for example. More about slot stickyness can be found here
找到解决方案,将 Webjobs.Publish nuget 包从 1.0.6 降级到 1.0.3 后一切顺利。 MS 在发布与当前工具不匹配的包时应该更加小心,因为这不是我们第一次遇到这样的问题。
这听起来像是同一个问题:An error occurred while creating the WebJob schedule
对我来说,我在服务器资源管理器中连接到目标订阅 window。听起来这应该与发布无关,但它有效。