22 lines
501 B
C#
22 lines
501 B
C#
using Hangfire;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
|
|
namespace IRaCIS.Core.API
|
|
{
|
|
public static class hangfireSetup
|
|
{
|
|
public static void AddhangfireSetup(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
|
|
|
|
services.AddHangfire(configuration => configuration
|
|
.UseInMemoryStorage()); // 使用内存存储
|
|
|
|
services.AddHangfireServer();
|
|
|
|
}
|
|
}
|
|
}
|