Skip to content

Commit

Permalink
Handle duplicate event inserts gracefully when using Postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
Robban1980 committed Sep 13, 2024
1 parent 927e93d commit dec0f4d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,8 @@ private boolean insertEventExecution(Connection connection, EventExecution event

String INSERT_EVENT_EXECUTION =
"INSERT INTO event_execution (event_handler_name, event_name, message_id, execution_id, json_data) "
+ "VALUES (?, ?, ?, ?, ?)";
+ "VALUES (?, ?, ?, ?, ?) "
+ "ON CONFLICT DO NOTHING";
int count =
query(
connection,
Expand Down

0 comments on commit dec0f4d

Please sign in to comment.