c# - Azure Webjobs 的扩展

标签 c# asp.net azure web-applications webjob

我有一个带有 2 个网络作业的 azure 网络应用程序。我只需要扩展一项网络作业。有什么方法可以独立于网站和其他网络作业进行扩展/扩展吗?

最佳答案

假设您的 WebJobs 是连续的,

来自https://github.com/projectkudu/kudu/wiki/WebJobs-API

If a continuous job is set as singleton it'll run only on a single instance opposed to running on all instances. By default, it runs on all instances.

To set a continuous job as singleton during deployment (without the need for the REST API) you can simply create a file called settings.job with the content: { "is_singleton": true } and put it at the root of the (specific) WebJob directory.

您希望保留在一个实例上的 WebJobs,设置为单例。 其余的将随着您的应用服务计划自动扩展。

触发式 WebJobs 仅在一个实例上运行。
来源:与上面相同的 URL。

Invoke a triggered job
Note: if the site has multiple instances, the job will run on one of them arbitrarily.

关于c# - Azure Webjobs 的扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39079158/

相关文章:

c# - .NET HashTable 与 Dictionary - Dictionary 能一样快吗?

C#客户端如何调用wsdl文件

c# - Asp.Net 如何在查询中使用 'IN' 子句传递参数以优化搜索

c# - Autofac.Hangfire 找不到已注册的类型

c# - 如何强制浏览器使用版本控制重新加载缓存的静态文件?

c# - 如何通过 IDataReader 读取图像

c# - 忽略 null 属性 Azure 表存储

使用 varchar (max) 的 Sql select 查询花费太多时间

c# - AzureServiceTokenProvider.GetAccessTokenAsync 是否跨(提供程序的)实例缓存 token ?

c# - wpf DocumentViewer - 通过 GlyphRun 获取 ITextPointer,反之亦然