Ejemplo n.º 1
0
        public async Task Consume(ConsumeContext <IResyncArchiveDatabase> context)
        {
            using (LogContext.PushProperty(nameof(context.ConversationId), context.ConversationId))
            {
                Log.Information("Received {CommandName} command with conversationId {ConversationId} from the bus", nameof(IResyncArchiveDatabase),
                                context.ConversationId);

                var affectedRecords = harvestManager.InitiateFullResync(context.Message.RequestInfo);
                await context.Publish <IResyncArchiveDatabaseStarted>(new { InsertedRecords = affectedRecords });
            }
        }