blob: 6a7b7a74c10f5a2524712ca0a1720f33252c09c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
namespace FundLab.Worker
open System
open System.Threading
open System.Threading.Tasks
open Microsoft.Extensions.Hosting
type Worker() =
inherit BackgroundService()
override _.ExecuteAsync(stoppingToken: CancellationToken) : Task =
task {
while not stoppingToken.IsCancellationRequested do
do! Task.Delay(TimeSpan.FromMinutes 5, stoppingToken)
}
|