Skip to content

Commit

Permalink
Moved prepareStatements() to constructor of PostgresProfileQueryHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhaug committed Feb 7, 2025
1 parent 0db8fbb commit 4a820b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public PostgresProfileQueryHandler(DataSource dataSource, long datasetId) throws
profileIds = new HashMap<>();
profileDurations = new HashMap<>();
this.datasetId = datasetId;
prepareStatements();
}

public void prepareStatements() throws SQLException {
Expand Down Expand Up @@ -78,7 +79,6 @@ on conflict (dataset_id, name) do nothing
* */
public void uploadResourceProfiles(final ResourceProfiles resourceProfiles) {
try {
prepareStatements();
// Add new profiles to DB
for (final var realEntry : resourceProfiles.realProfiles().entrySet()) {
if (!profileIds.containsKey(realEntry.getKey())) {
Expand Down

0 comments on commit 4a820b8

Please sign in to comment.