Fixing search task discovery

If a background task was creating a content item, the index task might not see it if the creation was done in the same second.

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-01-05 17:32:35 -08:00
parent cd9445930c
commit d2f86be59f

View File

@@ -101,7 +101,7 @@ namespace Orchard.Indexing.Services {
// retrieve not yet processed tasks
var taskRecords = lastIndexUtc == null
? _repository.Fetch(x => true).ToArray()
: _repository.Fetch(x => x.CreatedUtc > lastIndexUtc).ToArray();
: _repository.Fetch(x => x.CreatedUtc >= lastIndexUtc).ToArray(); // CreatedUtc and lastIndexUtc might be equal if a content item is created in a background task
// nothing to do ?