anchor.diff:      }
   
       Future _extend(Job job) async {
  -      return _db.withTransaction((tx) async {
  +      await _retryWithTransaction((tx) async {
           final list = await tx.lookup([job.key]);
           final current = list.single as Job;
           if (current.state == JobState.idle &&
  
positive.code:       await tx.commit();
        return selected;
      });
      return result as Job;
    }
  
    Future unlockStaleProcessing(JobService service) async {
      Future _unlock(Job job) {
        return _db.withTransaction((tx) async {
          final list = await tx.lookup([job.key]);
          final current = list.single as Job;
          if (current.state == JobState.processing &&
  
negative.code:   }
  
    Future complete(Job job, JobStatus status, {Duration extendDuration}) async {
      await _retryWithTransaction((tx) async {
        final items = await tx.lookup([_db.emptyKey.append(Job, id: job.id)]);
        final selected = items.single as Job;
        if (selected != null && selected.processingKey == job.processingKey) {
  