Skip to content

Commit

Permalink
[Bug] Fix failed to write data to t_message (#4156)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhiwei Shi <[email protected]>
  • Loading branch information
Happy-shi and Zhiwei Shi authored Jan 8, 2025
1 parent 98aa780 commit 924fea6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.streampark.console.core.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

import java.util.Arrays;

/** notification type */
Expand All @@ -27,6 +29,7 @@ public enum NoticeTypeEnum {
/** message */
MESSAGE(2);

@EnumValue
private final int value;

public int get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message>

@Override
public void push(Message message) {
save(message);
WebSocketEndpoint.pushNotice(message);
try {
save(message);
WebSocketEndpoint.pushNotice(message);
} catch (Exception e) {
log.error("Error pushing notice: {}", e.getMessage(), e);
}
}

@Override
Expand Down

0 comments on commit 924fea6

Please sign in to comment.