public void notifyEnd ( String projectName , String projectVersion , String category , long duration ) { try { if ( isStarted ( ) ) { JSONObject endNotification = new JSONObject ( ) . put ( "project" , new JSONObject ( ) . put ( "name" , projectName ) . put ( "version" , projectVersion ) ) . put ( "category" , category ) . put ( "duration" , duration ) ; socket . emit ( "run:end" , endNotification ) ; } else { LOGGER . warn ( "Minirox is not available to send the end notification" ) ; } } catch ( Exception e ) { LOGGER . info ( "Unable to send the end notification to MINI ROX. Cause: {}" , e . getMessage ( ) ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Exception: " , e ) ; } } }
Send a ending notification to Mini ROX