anchor.diff:            ..lastStatus = status
             ..processingKey = null
             ..errorCount = errorCount
  -          ..lockedUntil =
  -              new DateTime.now().toUtc().add(extendDuration ?? _extendDuration)
  +          ..lockedUntil = _extendLock(errorCount, duration: extendDuration)
             ..updatePriority();
           tx.queueMutations(inserts: [selected]);
           await tx.commit();
  
positive.code:       final list = await tx.lookup([_db.emptyKey.append(Job, id: id)]);
        final current = list.single as Job;
        if (current != null) {
          if (!shouldProcess &&
              current.isLatestStable == isLatestStable &&
              current.packageVersionUpdated == packageVersionUpdated &&
              current.runtimeVersion == versions.runtimeVersion) {
            return;
          }
          if (isNewer(
              versions.semanticRuntimeVersion, current.semanticRuntimeVersion)) {
            return;
          }
          _logger.info('Updating job: $id');
  
negative.code:       },
      };
    }
  
    DateTime _extendLock(int errorCount, {Duration duration}) {
      return new DateTime.now()
          .toUtc()
          .add(duration ?? _extendDuration)
          .add(new Duration(hours: math.min(errorCount, 168 /* one week */)));
    }
  }
  