Skip to content

Commit

Permalink
Remove the need for the schedules.db #2994
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed May 31, 2019
1 parent 4190baf commit 1cf1c06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Ombi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using AutoMapper.EquivalencyExpression;
using Hangfire;
using Hangfire.Dashboard;
using Hangfire.MemoryStorage;
using Hangfire.SQLite;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand Down Expand Up @@ -93,16 +94,15 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
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()));
});

Expand Down

0 comments on commit 1cf1c06

Please sign in to comment.