File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
core/main/java/com/codingchili/core Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ private void start(CoreContext core, List<String> nodes) {
141141 */
142142 private void deployServices (List <String > nodes ) {
143143 List <Future > deployments = new ArrayList <>();
144- //String node = nodes.get(0);
145144
146145 for (String node : nodes ) {
147146 if (isDeployable (node )) {
@@ -152,7 +151,16 @@ private void deployServices(List<String> nodes) {
152151 }
153152 CompositeFuture .all (deployments ).onComplete (deployed -> {
154153 if (deployed .failed ()) {
155- logger .onError (deployed .cause ());
154+ for (var i = 0 ; i < deployments .size (); i ++) {
155+ var future = deployments .get (i );
156+
157+ if (future .failed ()) {
158+ logger .event (LOG_SERVICE_FAIL )
159+ .put (ID_SERVICE , nodes .get (i ))
160+ .put (LOG_ERROR , throwableToString (future .cause ()))
161+ .send ();
162+ }
163+ }
156164 exit ();
157165 }
158166 });
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ public abstract class CoreStrings {
110110 public static final String ID_UPDATED = "updated" ;
111111 public static final String ID_SIZE = "size" ;
112112 public static final String ID_DOMAIN = "domain" ;
113+ public static final String ID_SERVICE = "service" ;
113114 public static final String ID_PING = "ping" ;
114115 public static final String ID_BUFFER = "buffer" ;
115116 public static final String ID_TYPE = "type" ;
@@ -161,6 +162,7 @@ public abstract class CoreStrings {
161162 public static final String LOG_LISTENER_STOP = "listener.stop" ;
162163 public static final String LOG_LISTENER_START = "listener.start" ;
163164 public static final String LOG_LISTENER = "listener" ;
165+ public static final String LOG_SERVICE = "service" ;
164166 public static final String LOG_MESSAGE = "message" ;
165167 public static final String LOG_LEVEL = "level" ;
166168 public static final String LOG_VERTX = "vertx" ;
You can’t perform that action at this time.
0 commit comments