ServerJob doesn't wait for delay before to reschedule [message #983214] |
Tue, 13 November 2012 19:27 |
Boy D'Poy Messages: 67 Registered: October 2011 |
Member |
|
|
i have this snippet:
==========
final long delay = 10000L;
final String name = "name";
new ServerJob(name, ServerJob.getCurrentSession(ServerSession.class)) {
@Override
protected IStatus runTransaction(final IProgressMonitor monitor) throws Exception {
try {
//
// exceptionalCode();
//
}
catch (final Exception e) {
this.schedule(delay);
return Status.CANCEL_STATUS;
}
this.schedule();
return Status.OK_STATUS;
}
}.schedule();
==========
I would like the job to wait for 10 seconds before the next attempt if the exceptionalCode throws an exception, but the expected behaviour is not matched: the job restarts immediately.
What dit I did wrong?
Thanks.
Once You Go Scout, You Never Come Out!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03262 seconds