File tree 1 file changed +8
-5
lines changed
server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/serverlog
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 9
9
import org .apache .commons .collections4 .CollectionUtils ;
10
10
import org .lowcoder .infra .event .SystemCommonEvent ;
11
11
import org .lowcoder .infra .perf .PerfHelper ;
12
+ import org .lowcoder .plugin .events .ServerLogEvent ;
12
13
import org .springframework .beans .factory .annotation .Autowired ;
13
14
import org .springframework .context .ApplicationEventPublisher ;
14
15
import org .springframework .scheduling .annotation .Scheduled ;
@@ -46,11 +47,13 @@ private void scheduledInsert() {
46
47
.subscribe (result -> {
47
48
int count = result .size ();
48
49
perfHelper .count (SERVER_LOG_BATCH_INSERT , Tags .of ("size" , String .valueOf (result .size ())));
49
- applicationEventPublisher .publishEvent (SystemCommonEvent .builder ()
50
- .apiCalls (count )
51
- .detail ("apiCalls" , Integer .toString (count ))
52
- .build ()
53
- );
50
+ publishServerLogEvent (count );
54
51
});
55
52
}
53
+
54
+ private void publishServerLogEvent (int count ) {
55
+ ServerLogEvent event = new ServerLogEvent ();
56
+ event .setApiCallsCount (count );
57
+ applicationEventPublisher .publishEvent (event );
58
+ }
56
59
}
You can’t perform that action at this time.
0 commit comments