Skip to content

Commit

Permalink
fix: listen to beforeReload instead of onReload
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Sep 30, 2024
1 parent ee17fdd commit ad055c0
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import org.geoserver.cloud.event.lifecycle.LifecycleEvent;
import org.geoserver.cloud.event.lifecycle.ReloadEvent;
import org.geoserver.cloud.event.lifecycle.ResetEvent;
Expand Down Expand Up @@ -39,13 +38,15 @@ public void onDispose() {

@Override
public void beforeReload() {
log.info("Ignoring the beforeReload event");
// Thus, we want to inform all connected services as early as possible
// to activate reloading in parallel.
log.info("Publishing the beforeReload event");

publish(new ReloadEvent());
}

@Override
public void onReload() {
log.info("Publishing the onReload event");

publish(new ReloadEvent());
log.info("Ignoring the onReload event");
}
}

0 comments on commit ad055c0

Please sign in to comment.