We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3e4f225 + c4fa9a9 commit 69e28aaCopy full SHA for 69e28aa
merlin-worker/src/main/java/gov/nasa/jpl/aerie/merlin/worker/postgres/PostgresProfileStreamer.java
@@ -27,12 +27,12 @@ public void accept(final ResourceProfiles resourceProfiles) {
27
28
@Override
29
public void close() {
30
- queryQueue.shutdown();
31
- try {
32
- queryHandler.close();
33
- } catch (SQLException e) {
34
- throw new DatabaseException("Error occurred while attempting to close PostgresProfileQueryHandler", e);
35
- }
+ queryQueue.close(); // This waits for all submitted jobs to complete before returning
+ try {
+ queryHandler.close();
+ } catch (SQLException e) {
+ throw new DatabaseException("Error occurred while attempting to close PostgresProfileQueryHandler", e);
+ }
36
}
37
38
0 commit comments