Change to Task.Delay
This commit is contained in:
parent
c3ec745e05
commit
7f23ef168e
@ -18,6 +18,7 @@ namespace SagaManager
|
|||||||
using Services;
|
using Services;
|
||||||
using Autofac.Extensions.DependencyInjection;
|
using Autofac.Extensions.DependencyInjection;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
@ -25,7 +26,12 @@ namespace SagaManager
|
|||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
StartUp();
|
MainAsync().Wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async Task MainAsync()
|
||||||
|
{
|
||||||
|
StartUp();
|
||||||
|
|
||||||
IServiceCollection services = new ServiceCollection();
|
IServiceCollection services = new ServiceCollection();
|
||||||
var serviceProvider = ConfigureServices(services);
|
var serviceProvider = ConfigureServices(services);
|
||||||
@ -39,7 +45,7 @@ namespace SagaManager
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
sagaManagerService.CheckFinishedGracePeriodOrders();
|
sagaManagerService.CheckFinishedGracePeriodOrders();
|
||||||
System.Threading.Thread.Sleep(30000);
|
await Task.Delay(30000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user