File tree Expand file tree Collapse file tree
src/Services/SagaManager/SagaManager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,14 +18,20 @@ namespace SagaManager
1818 using Services ;
1919 using Autofac . Extensions . DependencyInjection ;
2020 using Autofac ;
21+ using System . Threading . Tasks ;
2122
2223 public class Program
2324 {
2425 public static IConfigurationRoot Configuration { get ; set ; }
2526
2627 public static void Main ( string [ ] args )
2728 {
28- StartUp ( ) ;
29+ MainAsync ( ) . Wait ( ) ;
30+ }
31+
32+ static async Task MainAsync ( )
33+ {
34+ StartUp ( ) ;
2935
3036 IServiceCollection services = new ServiceCollection ( ) ;
3137 var serviceProvider = ConfigureServices ( services ) ;
@@ -39,7 +45,7 @@ public static void Main(string[] args)
3945 while ( true )
4046 {
4147 sagaManagerService . CheckFinishedGracePeriodOrders ( ) ;
42- System . Threading . Thread . Sleep ( 30000 ) ;
48+ await Task . Delay ( 30000 ) ;
4349 }
4450 }
4551
You can’t perform that action at this time.
0 commit comments