summaryrefslogtreecommitdiffstats
path: root/gearman/controllerWorker/ControllerWorker/Shutdown.java
diff options
context:
space:
mode:
Diffstat (limited to 'gearman/controllerWorker/ControllerWorker/Shutdown.java')
-rw-r--r--gearman/controllerWorker/ControllerWorker/Shutdown.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/gearman/controllerWorker/ControllerWorker/Shutdown.java b/gearman/controllerWorker/ControllerWorker/Shutdown.java
index 70582e6..a7ea746 100644
--- a/gearman/controllerWorker/ControllerWorker/Shutdown.java
+++ b/gearman/controllerWorker/ControllerWorker/Shutdown.java
@@ -56,6 +56,7 @@ public class Shutdown extends Thread {
this.psJobs = new HashMap<Integer, GearmanJob>();
this.status = new HashMap<Integer, Integer>();
this.errors = new HashMap<Integer, String>();
+ this.pingShutdownTime = new HashMap<Integer, Long>();
this.updateRate = updateRate; // updates per second
this.updatePeriod = 1000000000L / this.updateRate; // nanoseconds
this.gearmanConnection = new GearmanNIOJobServerConnection(
@@ -302,16 +303,16 @@ public class Shutdown extends Thread {
if (alive.equals("false")) {
System.out
.println(ipAddress
- + " is alive after shutdown. Ping again...");
- // alive, ping again
- status.put(clientID, 7);
+ + " is not alive after shutdown");
+ // not alive, go in successState
+ status.put(clientID, 13);
pingShutdownJobs.remove(clientID);
- } else if (alive.equals("false")) {
+ } else if (alive.equals("true")) {
System.out
- .println("not alive after shutdown"
- + ipAddress);
- // go in successState
- status.put(clientID, 13);
+ .println(ipAddress
+ + " is still alive after shutdown");
+ // still alive, ping again
+ status.put(clientID, 7);
}
} else {
System.out