c# - cofoundry 0.40 hangfire 管理部分
问题描述
我正在尝试使用Cofoundry.Plugins.Hangfire.EnableHangfireDashboard
布尔值为 cofoundry 管理员启用hangfire仪表板
程序片段:
public class HangfireOvverideSetting : IDependencyRegistration
{
public void Register(IContainerRegister container)
{
var registrationOptions = new HangfireSettings() { Disabled = false, EnableHangfireDashboard = true };
// container.Register<IMyService, MyService>(registrationOptions);
// OR use the static helper
container.Register<IHangfireServerInitializer>(RegistrationOptions.Override());
}
}
如何在这里启用?
解决方案
安装 Cofoundry.Plugins.BackgroundTasks.Hangfire NuGet包后,Hangfire 将自动注册和设置。
Hangfire 仪表板默认禁用,但要启用它,您只需要更新 appsettings.json 中的应用程序设置:
{
"Cofoundry:Plugins:Hangfire:EnableHangfireDashboard": true
}
然后可以在您的管理站点“/admin/hangfire”中访问它。文档中的设置分隔符存在错误,但现在已修复。
您不必重写IHangfireServerInitializer
来启用此功能。
推荐阅读
- java - 创建地图
> 使用 Stream API 对列表元素进行排序的位置 - python - 在绘图中使用滑块时如何更改轴标题
- symfony - symfony fetchall 与 manyToOne 关系多次返回相同的对象
- ruby-on-rails - 从 rake 任务中添加 Ruby on Rails ActiveJob 后台任务
- git - Gitignor Unity重命名空白并且推拉后不工作
- machine-learning - 使用 GPT2 运行 huggingface 转换器 run_language_modeling.py 时会占用大量内存
- ubuntu - 在 WSL2 (Ubuntu 20.04) 中运行的 Nginx 不会将 HTML 页面提供给位于端口 80 之外的另一个端口上的 Windows 10 主机
- python - pygame中没有显示矩形
- c# - 我该如何解决这个异常?我无法找到生成此内容的人
- azure - Azure SQL DW 超大规模和 Azure Synapse 的路线图