File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/client Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ public class KieClient {
5757
5858 private static final int LONG_POLLING_WAIT_TIME_IN_SECONDS = 30 ;
5959
60+ private static String revision = "0" ;
61+
6062 private static final KieConfig KIE_CONFIG = KieConfig .INSTANCE ;
6163
6264 private final int refreshInterval = KIE_CONFIG .getRefreshInterval ();
@@ -115,8 +117,8 @@ void refreshConfig(CountDownLatch latch) {
115117 String path = "/v1/"
116118 + KieConfig .INSTANCE .getDomainName ()
117119 + "/kie/kv?label=app:"
118- + KieConfig .INSTANCE .getAppName ();
119-
120+ + KieConfig .INSTANCE .getAppName ()
121+ + "&revision=" + revision ;
120122 long timeout ;
121123 if (enableLongPolling && !IS_FIRST_PULL .get ()) {
122124 path += "&wait=" + LONG_POLLING_WAIT_TIME_IN_SECONDS + "s" ;
@@ -131,6 +133,7 @@ void refreshConfig(CountDownLatch latch) {
131133 HttpClientRequest request = client
132134 .get (ipPort .getPort (), ipPort .getHostOrIp (), finalPath , rsp -> {
133135 if (rsp .statusCode () == HttpStatus .SC_OK ) {
136+ revision = rsp .getHeader ("X-Kie-Revision" );
134137 rsp .bodyHandler (buf -> {
135138 try {
136139 Map <String , Object > resMap = KieUtil .getConfigByLabel (JsonUtils .OBJ_MAPPER
You can’t perform that action at this time.
0 commit comments