Browse Source

Fix queries

Jordi Boggiano 13 years ago
parent
commit
66d8a031fb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Packagist/WebBundle/Entity/PackageRepository.php

+ 2 - 2
src/Packagist/WebBundle/Entity/PackageRepository.php

@@ -85,14 +85,14 @@ class PackageRepository extends EntityRepository
     {
     {
         $conn = $this->getEntityManager()->getConnection();
         $conn = $this->getEntityManager()->getConnection();
 
 
-        return $conn->fetchAll('SELECT p.id FROM package p WHERE p.indexedAt IS NULL OR p.indexedAt < p.crawledAt ORDER BY p.id ASC');
+        return $conn->fetchAll('SELECT p.id FROM package p WHERE p.indexedAt IS NULL OR p.indexedAt <= p.crawledAt ORDER BY p.id ASC');
     }
     }
 
 
     public function getStalePackagesForDumping()
     public function getStalePackagesForDumping()
     {
     {
         $conn = $this->getEntityManager()->getConnection();
         $conn = $this->getEntityManager()->getConnection();
 
 
-        return $conn->fetchAll('SELECT p.id FROM package p WHERE p.dumpedAt IS NULL OR p.dumpedAt < p.crawledAt  ORDER BY p.id ASC');
+        return $conn->fetchAll('SELECT p.id FROM package p WHERE p.dumpedAt IS NULL OR p.dumpedAt <= p.crawledAt  ORDER BY p.id ASC');
     }
     }
 
 
     public function findOneByName($name)
     public function findOneByName($name)