Exemple #1
0
    private async Task ConsumeInternal(DateTimeOffset lastProcessedNoteUpdateAt, SearchEngineType searchEngineType)
    {
        _logger.LogTrace(
            "Note history requested after {LastProcessedNoteUpdate} in {SearchEngine}",
            lastProcessedNoteUpdateAt,
            searchEngineType);

        var(changedPostIds, lastNoteUpdateDate) = await _arachneSearchService.LoadChangesForNotesSince(
            lastProcessedNoteUpdateAt,
            searchEngineType);

        var command = new
        {
            SourceId           = (int)searchEngineType,
            PostIds            = changedPostIds,
            LastNoteUpdateDate = lastNoteUpdateDate
        };

        await _bus.Send <INotesUpdatedCommand>(command);
    }