anchor.diff:  import 'package:gcloud/db.dart' as db;
   import 'package:logging/logging.dart';
   import 'package:meta/meta.dart';
  +import 'package:pool/pool.dart';
   
   import '../frontend/models.dart' show Package, PackageVersion;
   import '../shared/task_scheduler.dart';
  
positive.code: 
    /// Reads the current package versions and syncs them with job entries.
    Future syncDatastoreHistory() async {
      final packages = new Map<String, String>();
      final stream = randomizeStream(_db.query(PackageVersion).run());
      await for (PackageVersion pv in stream) {
        try {
          if (!packages.containsKey(pv.package)) {
            final list = await _db.lookup([pv.packageKey]);
            final Package p = list.single;
            packages[pv.package] = p.latestVersion;
          }
          final bool isLatestStable = packages[pv.package] == pv.version;
          final shouldProcess =
              await _shouldProcess(pv.package, pv.version, pv.created);
          await jobBackend.createOrUpdate(_service, pv.package, pv.version,
  
negative.code:             'History sync failed for ${pv.package} ${pv.version}', e, st);
        }
      }
  
      var pool = new Pool(4);
      for (String package in packages) {
        final String version = latestVersions[package];
        final PackageVersion pv = (await _db.lookup([
          _db.emptyKey
              .append(Package, id: package)
              .append(PackageVersion, id: version)
        ]))
            .single;
        pool.withResource(() => updateJob(pv, false));
      }
      await pool.close();
  
      pool = new Pool(4);
      final stream = randomizeStream(_db.query(PackageVersion).run());
      await for (PackageVersion pv in stream) {
        pool.withResource(() => updateJob(pv, true));
      }
      await pool.close();
    }
  
    /// Never completes
  