diff options
Diffstat (limited to 'Main')
-rw-r--r-- | Main/Main.csproj | 2 | ||||
-rw-r--r-- | Main/Startup.cs | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Main/Main.csproj b/Main/Main.csproj index d0acd53..50d274a 100644 --- a/Main/Main.csproj +++ b/Main/Main.csproj @@ -6,7 +6,7 @@ <ItemGroup>
<PackageReference Include="Hangfire" Version="1.6.22" />
- <PackageReference Include="Hangfire.MySqlStorage" Version="2.0.0" />
+ <PackageReference Include="Hangfire.MemoryStorage" Version="1.6.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
diff --git a/Main/Startup.cs b/Main/Startup.cs index 7f615fd..c1e4a10 100644 --- a/Main/Startup.cs +++ b/Main/Startup.cs @@ -9,6 +9,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
+using Hangfire;
+using Hangfire.MemoryStorage;
using Classes;
using Database;
@@ -29,8 +31,10 @@ namespace Server { });
services.AddDbContext<DatabaseContext>(options => {
- options.UseMySQL(Configuration.GetConnectionString("connectionString"));
+ options.UseMySQL(Configuration.GetConnectionString("Aggregator"));
});
+
+ services.AddHangfire(options => options.UseMemoryStorage());
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
@@ -49,6 +53,9 @@ namespace Server { "Website"
)
);
+
+ app.UseHangfireDashboard();
+ app.UseHangfireServer();
}
}
}
|