mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Added Hangfire #865
This commit is contained in:
parent
d2915df36e
commit
a561915df9
6 changed files with 46 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="6.0.2" />
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="2.0.1" />
|
||||
<PackageReference Include="Hangfire" Version="1.6.12" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.1" />
|
||||
|
|
8
Ombi/Ombi.Schedule/Class1.cs
Normal file
8
Ombi/Ombi.Schedule/Class1.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
using System;
|
||||
|
||||
namespace Ombi.Schedule
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
13
Ombi/Ombi.Schedule/Ombi.Schedule.csproj
Normal file
13
Ombi/Ombi.Schedule/Ombi.Schedule.csproj
Normal file
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Hangfire" Version="1.6.12" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.6.12" />
|
||||
<PackageReference Include="Hangfire.MemoryStorage.Core" Version="1.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -34,6 +34,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DI", "DI", "{410F36CF-9C60-
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ombi.Api.Plex", "Ombi.Api.Plex\Ombi.Api.Plex.csproj", "{2E1A7B91-F29B-42BC-8F1E-1CF2DCC389BA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ombi.Schedule", "Ombi.Schedule\Ombi.Schedule.csproj", "{5B42ADD4-757A-47C1-9CC5-320829C5E665}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -76,6 +78,10 @@ Global
|
|||
{2E1A7B91-F29B-42BC-8F1E-1CF2DCC389BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E1A7B91-F29B-42BC-8F1E-1CF2DCC389BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E1A7B91-F29B-42BC-8F1E-1CF2DCC389BA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5B42ADD4-757A-47C1-9CC5-320829C5E665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B42ADD4-757A-47C1-9CC5-320829C5E665}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B42ADD4-757A-47C1-9CC5-320829C5E665}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5B42ADD4-757A-47C1-9CC5-320829C5E665}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="6.0.2" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.6.12" />
|
||||
<PackageReference Include="Hangfire.MemoryStorage.Core" Version="1.4.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using AutoMapper;
|
||||
using Hangfire;
|
||||
using Hangfire.MemoryStorage;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
|
@ -12,6 +14,16 @@ namespace Ombi
|
|||
{
|
||||
public partial class Startup
|
||||
{
|
||||
|
||||
//public void ConfigureServices(IServiceCollection services)
|
||||
//{
|
||||
//}
|
||||
|
||||
//public void Configure(IApplicationBuilder app)
|
||||
//{
|
||||
// app.UseHangfireServer();
|
||||
// app.UseHangfireDashboard();
|
||||
//}
|
||||
public Startup(IHostingEnvironment env)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
|
@ -33,6 +45,8 @@ namespace Ombi
|
|||
services.AddOmbiMappingProfile();
|
||||
services.AddAutoMapper();
|
||||
services.RegisterDependencies(); // Ioc and EF
|
||||
|
||||
services.AddHangfire(x => x.UseMemoryStorage(new MemoryStorageOptions()));
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
@ -50,7 +64,8 @@ namespace Ombi
|
|||
app.UseExceptionHandler("/Home/Error");
|
||||
}
|
||||
|
||||
|
||||
app.UseHangfireServer();
|
||||
app.UseHangfireDashboard();
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
||||
|
@ -73,8 +88,5 @@ namespace Ombi
|
|||
defaults: new { controller = "Home", action = "Index" });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue