worker always returns an empty string for Warnings and Exceptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman Java |
Fix Released
|
Undecided
|
Eric Lambert |
Bug Description
It looks like the worker always returns an empty string for getExceptions() and getWarnings(). It doesn't matter whether the worker function succeeded or failed.
I used the reverse worker and client examples to test...
Worker:
public class ReverseFunction extends AbstractGearman
@Override
public GearmanJobResult executeFunction() {
boolean jobResult = false;
String warningMsg = "Test the warning";
// tested by throwing an exception but still do not get warnings or exceptions on client side
// throw re;
return gjr;
}
}
Client:
public String reverse(String input) {
String function = ReverseFunction
String uniqueId = null;
byte[] data = ByteUtils.
GearmanJob job = GearmanJobImpl.
String value = "";
String valueWarn = "";
String valueEx = "";
try {
res = job.get();
if (res.jobSucceed
} else {
}
} catch (Exception e) {
}
String resultMsg = value.toString(
return resultMsg; // never get anything for res.getWarnings() or res.getExceptions()
}
Changed in gearman-java: | |
assignee: | nobody → Eric Lambert (elambert) |
milestone: | none → 0.06 |
Changed in gearman-java: | |
status: | New → Confirmed |
Changed in gearman-java: | |
status: | Confirmed → In Progress |
Changed in gearman-java: | |
status: | In Progress → Fix Committed |
Changed in gearman-java: | |
status: | Fix Committed → Fix Released |
My Environment: java-0. 6-SNAPSHOT
using gearman-
Dev machine: Ubuntu SMP Tue Jan 8 21:41:11 UTC 2013 i686 i686 i686 GNU/Linux
gearman server: gearmand ver. 0.27 on Ubuntu SMP Wed Sep 26 21:53:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux