@@ -129,7 +129,7 @@ private void OnGetDialogsResp(RESTConnector.Request req, RESTConnector.Response
129
129
}
130
130
catch ( Exception e )
131
131
{
132
- Log . Error ( "NLC " , "GetDialogs Exception: {0}" , e . ToString ( ) ) ;
132
+ Log . Error ( "Dialog " , "GetDialogs Exception: {0}" , e . ToString ( ) ) ;
133
133
resp . Success = false ;
134
134
}
135
135
}
@@ -459,8 +459,22 @@ public CheckServiceStatus( Dialog service, ServiceStatus callback )
459
459
m_Service = service ;
460
460
m_Callback = callback ;
461
461
462
- if ( ! m_Service . GetDialogs ( OnGetDialogs ) )
463
- OnFailure ( "Failed to invoke GetDialogs()." ) ;
462
+ string customServiceID = Config . Instance . GetVariableValue ( SERVICE_ID + "_ID" ) ;
463
+
464
+ //If custom classifierID is defined then we are using it to check the service health
465
+ if ( ! string . IsNullOrEmpty ( customServiceID ) ) {
466
+
467
+ if ( ! m_Service . Converse ( customServiceID , "Hello" , OnDialog ) )
468
+ OnFailure ( "Failed to invoke Converse()." ) ;
469
+ else
470
+ m_DialogCount += 1 ;
471
+ }
472
+ else {
473
+ if ( ! m_Service . GetDialogs ( OnGetDialogs ) )
474
+ OnFailure ( "Failed to invoke GetDialogs()." ) ;
475
+ }
476
+
477
+
464
478
}
465
479
466
480
private void OnGetDialogs ( Dialogs dialogs )
@@ -496,7 +510,7 @@ private void OnDialog( ConverseResponse resp )
496
510
497
511
private void OnFailure ( string msg )
498
512
{
499
- Log . Error ( "NaturalLanguageClassifier " , msg ) ;
513
+ Log . Error ( "Dialog " , msg ) ;
500
514
m_Callback ( SERVICE_ID , false ) ;
501
515
m_DialogCount = 0 ;
502
516
}
0 commit comments