Skip to content

Commit

Permalink
fix seedlinks update status saying Done even though it is not done
Browse files Browse the repository at this point in the history
  • Loading branch information
xspanger3770 committed Aug 26, 2023
1 parent e9be555 commit a5ad72a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/globalquake/database/SeedlinkCommunicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public static void runAvailabilityCheck(SeedlinkNetwork seedlinkNetwork, Station
parseAvailability(infoString, stationDatabase, seedlinkNetwork);

reader.close();
seedlinkNetwork.getStatus().setString("Done");
seedlinkNetwork.getStatus().setValue(100);
}

private static void parseAvailability(String infoString, StationDatabase stationDatabase, SeedlinkNetwork seedlinkNetwork) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ public void runAvailabilityCheck(List<SeedlinkNetwork> toBeUpdated, Runnable onF
Future<Void> future = executor.submit(task);
future.get(SeedlinkCommunicator.SEEDLINK_TIMEOUT_SECONDS, TimeUnit.SECONDS);

seedlinkNetwork.getStatus().setString("Done");
seedlinkNetwork.getStatus().setValue(100);

break;
} catch(TimeoutException e){
seedlinkNetwork.getStatus().setString("Timed out!");
Expand Down

0 comments on commit a5ad72a

Please sign in to comment.