feat: add background task
This commit is contained in:
15
Endpoint/Common/Services/ScheduleSyncManager.cs
Normal file
15
Endpoint/Common/Services/ScheduleSyncManager.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Mirea.Api.Endpoint.Common.Services;
|
||||
|
||||
public static class ScheduleSyncManager
|
||||
{
|
||||
public static event Action? OnUpdateIntervalRequested;
|
||||
public static event Action? OnForceSyncRequested;
|
||||
|
||||
public static void RequestIntervalUpdate() =>
|
||||
OnUpdateIntervalRequested?.Invoke();
|
||||
|
||||
public static void RequestForceSync() =>
|
||||
OnForceSyncRequested?.Invoke();
|
||||
}
|
Reference in New Issue
Block a user