Run CleanUp on TaskPool

This commit is contained in:
ig 2023-03-21 11:40:23 +01:00
parent 28a0ef5530
commit e25de16f65
1 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,4 @@
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using InnovEnergy.App.Backend.DataTypes;
using InnovEnergy.App.Backend.DataTypes.Methods;
@ -39,8 +40,9 @@ public static partial class Db
Observable.Interval(TimeSpan.FromDays(0.5))
.StartWith(0) // Do it right away (on startup)
.ObserveOn(TaskPoolScheduler.Default)
.SelectMany(Cleanup)
.Subscribe(); // and then daily
.Subscribe();
}