在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"));

            });

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

猜你喜欢

转载自www.cnblogs.com/LmuQuan/p/9110184.html