if ( isAsync.compareAndSet(true, false) ) {
services.jobConsumerManager.unregisterListener(job.getId());
Job.JobState state = null;
if ( result.succeeded() ) {
state = Job.JobState.SUCCEEDED;
} else if ( result.failed() ) {
state = Job.JobState.QUEUED;
} else if ( result.cancelled() ) {
if ( handler.isStopped() ) {
state = Job.JobState.STOPPED;
} else {