File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88using Microsoft . Extensions . Hosting ;
99using Microsoft . Extensions . Logging ;
1010using Orleans ;
11+ using Orleans . Configuration ;
1112using Orleans . Hosting ;
1213using Transfer . IGrains . Common ;
1314using Transfer . IGrains . DTx ;
@@ -177,9 +178,18 @@ private static async Task<IClusterClient> StartClientWithRetries(int initializeA
177178 try
178179 {
179180 var builder = new HostBuilder ( )
180- . UseOrleansClient ( clientBuilder => clientBuilder . UseLocalhostClustering ( ) )
181+ . UseOrleansClient ( clientBuilder =>
182+ {
183+ clientBuilder . UseLocalhostClustering ( ) ;
184+ clientBuilder . Configure < ClusterOptions > ( options =>
185+ {
186+ options . ClusterId = "dev" ;
187+ options . ServiceId = "Transfer" ;
188+ } ) ;
189+ } )
181190 . ConfigureLogging ( logging => logging . AddConsole ( ) ) ;
182191 host = builder . Build ( ) ;
192+ await host . StartAsync ( ) ;
183193 client = host . Services . GetService < IClusterClient > ( ) ;
184194 Console . WriteLine ( "Client successfully connect to silo host" ) ;
185195 break ;
You can’t perform that action at this time.
0 commit comments