File tree Expand file tree Collapse file tree 7 files changed +0
-23
lines changed
Expand file tree Collapse file tree 7 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,6 @@ pub struct MyRequest {
1212
1313#[ tokio:: main]
1414async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
15- // TODO: Handle this issue in the sdk
16- // Introduce delay so that dapr grpc port is assigned before app tries to connect
17- std:: thread:: sleep ( std:: time:: Duration :: new ( 2 , 0 ) ) ;
18-
1915 // Define the Dapr address
2016 let addr = "https://127.0.0.1" . to_string ( ) ;
2117
Original file line number Diff line number Diff line change 11#[ tokio:: main]
22async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
3- // TODO: Handle this issue in the sdk
4- // Introduce delay so that dapr grpc port is assigned before app tries to connect
5- std:: thread:: sleep ( std:: time:: Duration :: new ( 2 , 0 ) ) ;
6-
73 // Set the Dapr address
84 let addr = "https://127.0.0.1" . to_string ( ) ;
95
Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ type DaprClient = dapr::Client<dapr::client::TonicClient>;
55
66#[ tokio:: main]
77async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
8- // TODO: Handle this issue in the sdk
9- // Introduce delay so that dapr grpc port is assigned before app tries to connect
10- std:: thread:: sleep ( std:: time:: Duration :: new ( 2 , 0 ) ) ;
11-
128 // Set the Dapr address
139 let addr = "https://127.0.0.1" . to_string ( ) ;
1410
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ use dapr::client::ReaderStream;
77
88#[ tokio:: main]
99async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
10- sleep ( std:: time:: Duration :: new ( 2 , 0 ) ) . await ;
1110 let addr = "https://127.0.0.1" . to_string ( ) ;
1211
1312 let mut client = dapr:: Client :: < dapr:: client:: TonicClient > :: connect ( addr) . await ?;
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ pub mod hello_world {
1010
1111#[ tokio:: main]
1212async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
13- // Sleep to allow for the server to become available
14- thread:: sleep ( Duration :: from_secs ( 5 ) ) ;
15-
1613 // Get the Dapr port and create a connection
1714 let port: u16 = std:: env:: var ( "DAPR_GRPC_PORT" ) . unwrap ( ) . parse ( ) . unwrap ( ) ;
1815 let address = format ! ( "https://127.0.0.1:{}" , port) ;
Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ type DaprClient = dapr::Client<dapr::client::TonicClient>;
1111
1212#[ tokio:: main]
1313async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
14- // Sleep to allow for the server to become available
15- thread:: sleep ( Duration :: from_secs ( 5 ) ) ;
16-
1714 // Set the Dapr address
1815 let address = "https://127.0.0.1" . to_string ( ) ;
1916
Original file line number Diff line number Diff line change @@ -17,10 +17,6 @@ struct Refund {
1717
1818#[ tokio:: main]
1919async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
20- // TODO: Handle this issue in the sdk
21- // Introduce delay so that dapr grpc port is assigned before app tries to connect
22- thread:: sleep ( Duration :: from_secs ( 2 ) ) ;
23-
2420 // Set address for Dapr connection
2521 let addr = "https://127.0.0.1" . to_string ( ) ;
2622
You can’t perform that action at this time.
0 commit comments