Skip to content

Commit

Permalink
Fix queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Apr 27, 2012
1 parent ee8be66 commit 66d8a03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Packagist/WebBundle/Entity/PackageRepository.php
Expand Up @@ -85,14 +85,14 @@ public function getStalePackagesForIndexing()
{
$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()
{
$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)
Expand Down

0 comments on commit 66d8a03

Please sign in to comment.