summaryrefslogtreecommitdiffstats
path: root/gearman
diff options
context:
space:
mode:
authorSebastian Wagner2011-08-17 17:54:38 +0200
committerSebastian Wagner2011-08-17 17:54:38 +0200
commit27e20357bf7da4d5a0a8e88f6632e5374ba9626a (patch)
tree55450fed4f370c555b2f335a980b9fdf41ef08d5 /gearman
parentsome ips and macs of pool-113 added (diff)
downloadpoolctrl-27e20357bf7da4d5a0a8e88f6632e5374ba9626a.tar.gz
poolctrl-27e20357bf7da4d5a0a8e88f6632e5374ba9626a.tar.xz
poolctrl-27e20357bf7da4d5a0a8e88f6632e5374ba9626a.zip
some checkStatus logic implemented
Diffstat (limited to 'gearman')
-rw-r--r--gearman/controllerWorker/ControllerWorker/Boot.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/gearman/controllerWorker/ControllerWorker/Boot.java b/gearman/controllerWorker/ControllerWorker/Boot.java
index 6c80557..af8c28c 100644
--- a/gearman/controllerWorker/ControllerWorker/Boot.java
+++ b/gearman/controllerWorker/ControllerWorker/Boot.java
@@ -446,12 +446,27 @@ public class Boot extends Thread {
if (!resultObj.containsKey("err")) {
JSONArray ps = (JSONArray) resultObj.get("ps");
boolean isWorking = true;
- if (isWorking) {
+
+ //LOGIC_TESTS
+ /*System.out.println("######");
+ System.out.println("######");
+ System.out.println("firefox: " + ps.toString().contains("firefox-bin")); // browser firefox
+ System.out.println("chromium: " + ps.toString().contains("chromium-browse")); // browser chromium
+ System.out.println("email: " + ps.toString().contains("thunderbird-bi")); // email
+ System.out.println("pdf-viewer: " + ps.toString().contains("evince")); // pdf-viewer
+ System.out.println("office: " + ps.toString().contains("soffice.bin")); // office
+ System.out.println("eclipse: " + ps.toString().contains("eclipse")); // eclipse
+ System.out.println("######");
+ System.out.println("gnome screensaver: " + ps.toString().contains("gnome-screensav")); // gnome screensaver
+ System.out.println("kde screensaver: " + ps.toString().contains("Kscreensaver")); // kde screensaver
+ System.out.println("######");*/
+
+ if (ps.toString().contains("firefox.bin") || ps.toString().contains("chromium-browse") || ps.toString().contains("thunderbird-bi") || ps.toString().contains("evince") || ps.toString().contains("soffice.bin") || ps.toString().contains("eclipse")) {
System.out.println(ipAddress
+ " is working");
status.put(clientID, 18); // is working
psJobs.remove(clientID);
- } else {
+ } else if (ps.toString().contains("gnome-screensav") || ps.toString().contains("Kscreensaver")) {
System.out.println(ipAddress
+ " is not working");
status.put(clientID, 13); // is not working
@@ -600,7 +615,8 @@ public class Boot extends Thread {
break;
case 18:
- System.out.println("User is working Logik");
+ System.out.println("User is working");
+ status.put(clientID, 29);
break;