@@ -179,7 +179,7 @@ private void checkDataInputStatus(List<UtmDataInputStatus> inputs, String server
179179 }
180180 }
181181
182- @ Scheduled (fixedDelay = 15000 , initialDelay = 30000 )
182+ @ Scheduled (fixedDelay = 1000 , initialDelay = 2000 )
183183 public void syncDataInputStatus () {
184184 final String ctx = CLASSNAME + ".syncDataInputStatus" ;
185185
@@ -198,10 +198,11 @@ public void syncDataInputStatus() {
198198 latestStats .forEach ((key , stat ) -> {
199199 try {
200200 String dataType = stat .getDataType ();
201- String dataSource = getDataSource (stat .getDataSource ());
201+ String assetName = this .getDataSource (stat .getDataSource ());
202+
202203 long timestamp = Instant .parse (stat .getTimestamp ()).getEpochSecond ();
203204
204- String compositeKey = dataType + "-" + dataSource ;
205+ String compositeKey = dataType + "-" + assetName ;
205206
206207 UtmDataInputStatus status = existing .get (compositeKey );
207208 boolean changed = false ;
@@ -210,14 +211,18 @@ public void syncDataInputStatus() {
210211 status = UtmDataInputStatus .builder ()
211212 .id (compositeKey )
212213 .dataType (dataType )
213- .source (dataSource )
214+ .source (assetName )
214215 .timestamp (timestamp )
215216 .median (86400L )
216217 .build ();
217218 changed = true ;
218219
219220 } else if (status .getTimestamp () != timestamp ) {
220- status .setSource (dataSource );
221+
222+ if (!assetName .equals (stat .getDataSource ())) {
223+ status .setSource (stat .getDataSource ());
224+ }
225+
221226 status .setTimestamp (timestamp );
222227 changed = true ;
223228 }
0 commit comments