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.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/gearman/controllerWorker/ControllerWorker/Shutdown.java b/gearman/controllerWorker/ControllerWorker/Shutdown.java
index cdd588f..e23f9f9 100644
--- a/gearman/controllerWorker/ControllerWorker/Shutdown.java
+++ b/gearman/controllerWorker/ControllerWorker/Shutdown.java
@@ -171,10 +171,10 @@ public class Shutdown extends Thread {
case USER_IS_WORKING:
logger.error(client.getIp() + " User has been working");
client.setError("The user has been working.");
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
break;
- case ERROR:
+ case SHUTDOWN_ERROR:
if (!client.isFinished()) {
logger.error(client.getIp() + " Shutdown failed"); // errorState
client.finish();
@@ -183,7 +183,7 @@ public class Shutdown extends Thread {
break;
- case SUCCESS:
+ case SHUTDOWN_SUCCESS:
if (!client.isFinished()) {
logger.info(client.getIp() + " Shutdown finished"); // successState
client.finish();
@@ -251,14 +251,14 @@ public class Shutdown extends Thread {
} else if (alive.equals("false")) {
logger.info(client.getIp() + " not alive");
// not alive, go in successState
- client.setState(ClientState.SUCCESS);
+ client.setState(ClientState.SHUTDOWN_SUCCESS);
pingJobs.remove(client.getId());
}
} else {
logger.error(client.getIp() + " Cannot send the ping message.");
client.setError("Sending the ping message has been failed.");
// sending the ping message has been failed
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
pingJobs.remove(client.getId());
}
}
@@ -316,7 +316,7 @@ public class Shutdown extends Thread {
/*
* cannot check if a user is logged in, go in errorState
*/
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
whoJobs.remove(client.getId());
}
}
@@ -355,7 +355,7 @@ public class Shutdown extends Thread {
client
.setError("Sending the shutdown command has been failed.");
//cannot send shutdown command, go in / errorState
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
doShutdownJobs.remove(client.getId());
}
}
@@ -393,7 +393,7 @@ public class Shutdown extends Thread {
String alive = resultObj.get("alive").toString();
if (alive.equals("false")) {
logger.info(client.getIp() + " is not alive anymore");
- client.setState(ClientState.SUCCESS);
+ client.setState(ClientState.SHUTDOWN_SUCCESS);
pingShutdownJobs.remove(client.getId());
} else if (alive.equals("true")) {
logger.info(client.getIp()
@@ -408,7 +408,7 @@ public class Shutdown extends Thread {
/*
* sending the ping after shutdown message has been failed
*/
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
pingJobs.remove(client.getId());
}
}
@@ -417,7 +417,7 @@ public class Shutdown extends Thread {
logger.error(client.getIp() + " is alive after shutdown");
client.setError("Client is still alive after shutdown.");
// still alive, go in errorState
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
pingShutdownJobs.remove(client.getId());
}
}
@@ -487,7 +487,7 @@ public class Shutdown extends Thread {
/*
* cannot check if user is working, go in errorState
*/
- client.setState(ClientState.ERROR);
+ client.setState(ClientState.SHUTDOWN_ERROR);
psJobs.remove(client.getId());
}
}