Subscribe Cleanup on TaskPoolScheduler, should make Backend startup faster
This commit is contained in:
parent
a6252895bb
commit
005da7fbcb
|
@ -18,18 +18,19 @@ public static partial class Db
|
||||||
|
|
||||||
public static TableQuery<Session> Sessions => Connection.Table<Session>();
|
public static TableQuery<Session> Sessions => Connection.Table<Session>();
|
||||||
public static TableQuery<Folder> Folders => Connection.Table<Folder>();
|
public static TableQuery<Folder> Folders => Connection.Table<Folder>();
|
||||||
public static TableQuery<DeletedFolder> DeletedFolders => Connection.Table<DeletedFolder>();
|
|
||||||
public static TableQuery<Installation> Installations => Connection.Table<Installation>();
|
public static TableQuery<Installation> Installations => Connection.Table<Installation>();
|
||||||
public static TableQuery<DeletedInstallation> DeletedInstallations => Connection.Table<DeletedInstallation>();
|
|
||||||
public static TableQuery<User> Users => Connection.Table<User>();
|
public static TableQuery<User> Users => Connection.Table<User>();
|
||||||
public static TableQuery<DeletedUser> DeletedUsers => Connection.Table<DeletedUser>();
|
|
||||||
public static TableQuery<FolderAccess> FolderAccess => Connection.Table<FolderAccess>();
|
public static TableQuery<FolderAccess> FolderAccess => Connection.Table<FolderAccess>();
|
||||||
public static TableQuery<InstallationAccess> InstallationAccess => Connection.Table<InstallationAccess>();
|
public static TableQuery<InstallationAccess> InstallationAccess => Connection.Table<InstallationAccess>();
|
||||||
public static TableQuery<OrderNumber2Installation> OrderNumber2Installation => Connection.Table<OrderNumber2Installation>();
|
public static TableQuery<OrderNumber2Installation> OrderNumber2Installation => Connection.Table<OrderNumber2Installation>();
|
||||||
|
|
||||||
|
public static TableQuery<DeletedInstallation> DeletedInstallations => Connection.Table<DeletedInstallation>();
|
||||||
|
public static TableQuery<DeletedUser> DeletedUsers => Connection.Table<DeletedUser>();
|
||||||
|
public static TableQuery<DeletedFolder> DeletedFolders => Connection.Table<DeletedFolder>();
|
||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
// used to force static constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,6 +55,7 @@ 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)
|
.ObserveOn(TaskPoolScheduler.Default)
|
||||||
|
.SubscribeOn(TaskPoolScheduler.Default)
|
||||||
.SelectMany(Cleanup)
|
.SelectMany(Cleanup)
|
||||||
.Subscribe();
|
.Subscribe();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue