- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Azure WebJob SDK 使用 AzureWebJobsStorage
和 AzureWebJobsDashboard
应用设置中定义的存储连接字符串进行日志记录和仪表板。
WebJob SDK 在 AzureWebJobsStorage
中创建以下 Blob 容器:
azure-webjobs-hosts
WebJob SDK 在 AzureWebJobsDashboard
中创建以下 Blob 容器
azure-jobs-host-output
azure-webjobs-hosts
当 WebJob 运行时,会在上述 Blob 容器中创建许多 Blob。如果没有清理机制,容器可能会膨胀或饱和。
上述 blob 容器的清理机制是什么?
更新
下面的答案是一个解决方法。目前,没有内置机制来清理 WebJobs 日志。随着作业长期运行,日志可能会堆积得相当大。开发人员必须自行创建清理机制。 Azure Functions 是实现此类清理过程的好方法。下面的答案提供了一个示例。
最佳答案
What is the clean up mechanism for the blobs that WebJobs SDK creates in the AzureWebJobsDashboard connection?
我还没找到办法。 GitHub 上有一个与此主题相关的未解决问题,但尚未关闭。
No way to set webjob logging retention policy
在 GitHub 上的类似问题中,我们发现 Azure WebJob SDK 更改了将日志保存到 Azure 表存储的多个表的方式。我们可以轻松地每月删除该表。对于写入 Azure Blob 存储的日志,到目前为止还没有按月分组。
WebJobs.Logging needs to support log purge / retention policies
要删除旧的 WebJob 日志,我建议您创建一个时间触发的 WebJob 来删除您想要的日志。
Is there any AzureFunction code sample shows how to do the blob cleanup?
以下代码供您引用。
// Parse the connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString);
// Create the table client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve a reference to a container.
var container = blobClient.GetContainerReference("azure-webjobs-hosts");
// Query out all the blobs which created after 30 days
var blobs = container.GetDirectoryReference("output-logs").ListBlobs().OfType<CloudBlob>()
.Where(b => b.Properties.LastModified < new DateTimeOffset(DateTime.Now.AddDays(-30)));
// Delete these blobs
foreach (var item in blobs)
{
item.DeleteIfExists();
}
关于azure - WebJobs SDK 在 AzureWebJobsDashboard 连接中创建的 blob 的清理机制是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43259345/
我正在尝试使用 Azure Webjobs,我了解它的工作方式,但我不明白为什么我需要使用两个连接字符串,一个用于保存消息的队列,但是 为什么还有另一个名为“AzureWebJobsDashboard
尝试更新我的服务总线应用以使用新的 RTM,我需要此信息。 以前我只使用与每个队列关联的连接字符串。我已经尝试了与我的帐户关联的用户名和 key 的每种组合,但没有成功。 最佳答案 Azu
当我单击查看 Azure 上的 WebJob 日志时,我看到以下内容。 但是,我在 App.config 文件中确实有正确的设置。我检查了好几遍。他们指向我的 Azure 存储帐户。 知道什么可能导致
我使用 Cosmos DB 触发器在 Visual studio 2017 中创建了一个 Azure 函数。在 local.setting.json 中,它要求我提供三件事,而我对前两件事感到困惑。
在我们针对 Azure Functions 的 Application Insights 日志中,有很多警告消息: The Dashboard setting is no longer support
在我们针对 Azure Functions 的 Application Insights 日志中,有很多警告消息: The Dashboard setting is no longer support
我正在向网站项目添加一个 webjob 项目。 Webjob 项目在部署到 Azure 时需要环境中的 AzureWebJobsStorage 和 AzureWebJobsDashboard 连接字符
Azure WebJob SDK 使用 AzureWebJobsStorage 和 AzureWebJobsDashboard 应用设置中定义的存储连接字符串进行日志记录和仪表板。 WebJob SD
据我所知,WebJob SDK 使用 AzureWebJobsDashboard 连接中定义的 Blob 存储来进行仪表板日志记录。 有没有办法让 WebJob SDK 使用 Azure 存储表而不是
我是一名优秀的程序员,十分优秀!