mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
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:
@@ -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 ?
|
||||
|
Reference in New Issue
Block a user