jobid = new Jobid(job.getGridJobId());
}
ctx.setJobid(jobid);
EventCREAMStatus event = new EventCREAMStatus();
event.setNewState(status.getName());
event.setNewState(status.getName());
event.setDescr(status.getDescription());
if (lastStatus != null) {
event.setOldState(lastStatus.getName());
}
event.setExitCode(status.getExitCode()); /*
* reasonable only in Done
* state
*/
event.setWorkerNode(job.getWorkerNode());
event.setLRMSJobid(job.getLRMSJobId());
event.setFailureReason(status.getFailureReason());
event.setOrigTimestamp(new Timeval(0, 0)); /* TODO */
switch (phase) {
case START:
event.setResult(EventCREAMStatus.Result.ARRIVED);
break;
case OK:
event.setResult(EventCREAMStatus.Result.DONE);
break;
default:
break; /* XXX */
}