Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdda057d

Browse files
aq-ikhwa-techludomikula
authored andcommitted
Publish server log event for ee plugin to consume
1 parentd8ed9c1 commitdda057d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/serverlog/ServerLogService.java‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
importorg.apache.commons.collections4.CollectionUtils;
1010
importorg.lowcoder.infra.event.SystemCommonEvent;
1111
importorg.lowcoder.infra.perf.PerfHelper;
12+
importorg.lowcoder.plugin.events.ServerLogEvent;
1213
importorg.springframework.beans.factory.annotation.Autowired;
1314
importorg.springframework.context.ApplicationEventPublisher;
1415
importorg.springframework.scheduling.annotation.Scheduled;
@@ -46,11 +47,13 @@ private void scheduledInsert() {
4647
.subscribe(result -> {
4748
intcount =result.size();
4849
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);
5451
});
5552
}
53+
54+
privatevoidpublishServerLogEvent(intcount) {
55+
ServerLogEventevent =newServerLogEvent();
56+
event.setApiCallsCount(count);
57+
applicationEventPublisher.publishEvent(event);
58+
}
5659
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp