summaryrefslogtreecommitdiffstats
path: root/gearman/controllerWorker/ControllerWorker/Shutdown.java
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-16 17:31:09 +0200
committerBjörn Geiger2011-08-16 17:31:09 +0200
commit2507f95b49a7d229c7a02095fe773f70cf6b873a (patch)
tree58db3629a0daa3a020dd5c1100ce15000e9b8b19 /gearman/controllerWorker/ControllerWorker/Shutdown.java
parentrename worker (diff)
downloadpoolctrl-2507f95b49a7d229c7a02095fe773f70cf6b873a.tar.gz
poolctrl-2507f95b49a7d229c7a02095fe773f70cf6b873a.tar.xz
poolctrl-2507f95b49a7d229c7a02095fe773f70cf6b873a.zip
verschiedenes
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