Run CleanUp on TaskPool
This commit is contained in:
parent
28a0ef5530
commit
e25de16f65
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Reactive.Concurrency;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using InnovEnergy.App.Backend.DataTypes;
|
using InnovEnergy.App.Backend.DataTypes;
|
||||||
using InnovEnergy.App.Backend.DataTypes.Methods;
|
using InnovEnergy.App.Backend.DataTypes.Methods;
|
||||||
|
@ -39,8 +40,9 @@ public static partial class Db
|
||||||
|
|
||||||
Observable.Interval(TimeSpan.FromDays(0.5))
|
Observable.Interval(TimeSpan.FromDays(0.5))
|
||||||
.StartWith(0) // Do it right away (on startup)
|
.StartWith(0) // Do it right away (on startup)
|
||||||
|
.ObserveOn(TaskPoolScheduler.Default)
|
||||||
.SelectMany(Cleanup)
|
.SelectMany(Cleanup)
|
||||||
.Subscribe(); // and then daily
|
.Subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue