zoukankan      html  css  js  c++  java
  • 在AbpZero中hangfire后台作业的使用——开启hangfire

        AbpZero框架已经集成了hangfire,但它默认是关闭的,我们可以在运行站点下的Startup.cs文件中把这行代码注释取消就行了,代码如下:

                //Hangfire (Enable to use Hangfire instead of default job manager)
                services.AddHangfire(config =>
                {
                    config.UseSqlServerStorage(_appConfiguration.GetConnectionString("Default"));

                });

            //Hangfire dashboard & server (Enable to use Hangfire instead of default job manager)
      app.UseHangfireDashboard("/hangfire", new DashboardOptions
      {
      // Authorization = new[] { new AbpHangfireAuthorizationFilter(AppPermissions.Pages_Administration_HangfireDashboard) }
      Authorization = new[] { new CustomAuthorizeFilter() }
      });
       app.UseHangfireServer();

       运行swagger后,把链接改为:http://localhost:22742/hangfire,即可调出hangfire后台作业管理页面。

  • 相关阅读:
    verilog RTL编程实践之四
    TB平台搭建之二
    hdu3466 Proud Merchants
    poj2411 Mondriaan's Dream (用1*2的矩形铺)
    zoj3471 Most Powerful
    poj2923 Relocation
    hdu3001 Travelling
    poj3311 Hie with the Pie
    poj1185 炮兵阵地
    poj3254 Corn Fields
  • 原文地址:https://www.cnblogs.com/LmuQuan/p/9110184.html
Copyright © 2011-2022 走看看