|
|
|
@ -4,6 +4,7 @@ using AutoMapper;
|
|
|
|
|
using AutoMapper.EquivalencyExpression;
|
|
|
|
|
using Hangfire;
|
|
|
|
|
using Hangfire.Dashboard;
|
|
|
|
|
using Hangfire.MemoryStorage;
|
|
|
|
|
using Hangfire.SQLite;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
@ -93,16 +94,15 @@ namespace Ombi
|
|
|
|
|
services.AddSwagger();
|
|
|
|
|
services.AddAppSettingsValues(Configuration);
|
|
|
|
|
|
|
|
|
|
var i = StoragePathSingleton.Instance;
|
|
|
|
|
var i = StoragePathSingleton.Instance;
|
|
|
|
|
if (string.IsNullOrEmpty(i.StoragePath))
|
|
|
|
|
{
|
|
|
|
|
i.StoragePath = string.Empty;
|
|
|
|
|
}
|
|
|
|
|
var sqliteStorage = $"Data Source={Path.Combine(i.StoragePath, "Schedules.db")};";
|
|
|
|
|
|
|
|
|
|
services.AddHangfire(x =>
|
|
|
|
|
{
|
|
|
|
|
x.UseSQLiteStorage(sqliteStorage);
|
|
|
|
|
x.UseMemoryStorage();
|
|
|
|
|
x.UseActivator(new IoCJobActivator(services.BuildServiceProvider()));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|