mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Corrected a bug which could cause the last content item to be indexed two times
--HG-- branch : dev
This commit is contained in:
@@ -113,10 +113,11 @@ namespace Orchard.Core.Indexing.Services {
|
||||
_indexProvider.SetLastIndexUtc(SearchIndexName, _clock.UtcNow);
|
||||
|
||||
// retrieve not yet processed tasks
|
||||
var taskRecords = _repository.Fetch(x => x.CreatedUtc >= lastIndexing)
|
||||
var taskRecords = _repository.Fetch(x => x.CreatedUtc > lastIndexing)
|
||||
.ToArray();
|
||||
|
||||
if (taskRecords.Length == 0)
|
||||
// nothing to do ?
|
||||
if (taskRecords.Length + updateIndexDocuments.Count == 0)
|
||||
return;
|
||||
|
||||
Logger.Information("Processing {0} indexing tasks", taskRecords.Length);
|
||||
|
||||
Reference in New Issue
Block a user