Line 860, 861 and 866, 867 are the same:

job.commit(amberDbService);
job.complete();

Can you move them above the line 859 which is the start of this conditional?