Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Urisman authored and Igor Urisman committed Oct 4, 2023
1 parent a0a1274 commit 664b9aa
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import com.variant.share.schema.Variation.Experience;
import com.variant.server.spi.FlushableTraceEvent;
import com.variant.server.spi.TraceEventFlusher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
Expand Down Expand Up @@ -102,9 +104,9 @@ public void execute(Connection conn) throws SQLException {
stmt.setString(2, event.getSessionId());
stmt.setTimestamp(3, Timestamp.from(event.getTimestamp()));
stmt.setString(4, event.getName());
stmt.addBatch();
stmt.execute();
stmt.clearParameters();
}
stmt.executeBatch();
stmt.close();
conn.commit();

Expand All @@ -118,10 +120,10 @@ public void execute(Connection conn) throws SQLException {
stmt.setString(1, event.getId());
stmt.setString(2, param.getKey());
stmt.setString(3, param.getValue());
stmt.addBatch();
stmt.execute();
stmt.clearParameters();
}
}
stmt.executeBatch();
stmt.close();

//
Expand All @@ -135,12 +137,13 @@ public void execute(Connection conn) throws SQLException {
stmt.setString(2, exp.getVariation().getName());
stmt.setString(3, exp.getName());
stmt.setBoolean(4, exp.isControl());
stmt.addBatch();
stmt.execute();
stmt.clearParameters();
}
}

stmt.executeBatch();
stmt.close();

conn.commit();
}
}
);
Expand Down

0 comments on commit 664b9aa

Please sign in to comment.