System.exit(1);
}
- int num = Integer.valueOf(args[0]).intValue();
- //Msg.info("Receiving on 'worker_"+num+"'");
+ int num = Integer.parseInt(args[0]);
+ Msg.debug("Receiving on 'worker_"+num+"'");
while(true) {
Task task = Task.receive("worker_"+num);
- if (task.getName().equals("finalize")) {
+ if ("finalize".equals(task.getName())) {
break;
}
Msg.info("Received \"" + task.getName() + "\". Processing it.");
try {
task.execute();
- } catch (TaskCancelledException e) {}
+ } catch (TaskCancelledException e) {
+ e.printStackTrace();
+ }
}
Msg.info("Received Finalize. I'm done. See you!");