| 214 | {{{ |
| 215 | public class MyAnalysisCompletionHandler |
| 216 | implements JobCompletionHandler |
| 217 | { |
| 218 | |
| 219 | public MyAnalysisCompletionHandler() |
| 220 | {} |
| 221 | |
| 222 | @Override |
| 223 | public String jobCompleted(SessionControl sc, OpenGridSession session, Job job, JobStatus status) |
| 224 | { |
| 225 | String jobName = status.getName(); |
| 226 | String logfile = session.getJobFileAsString(jobName, "logfile", "UTF-8"); |
| 227 | |
| 228 | DbControl dc = sc.newDbControl(); |
| 229 | try |
| 230 | { |
| 231 | String msg = parseLogfile(dc, logfile); |
| 232 | dc.commit(); |
| 233 | return msg; |
| 234 | } |
| 235 | finally |
| 236 | { |
| 237 | if (dc != null) dc.close(); |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | }}} |
| 242 | |