Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@ public MessagesViewIndex()
{
Map = messages =>
from message in messages
let metadata = message.MessageMetadata
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mauroservienti I was banging my head against the wall... but I think let somehow is not supported. Could you quickly review the CI build? The error is about object but it does not make sense to me.

Issue it to that I for some reason cannot run these test locally so I cannot easily run them

select new SortAndFilterOptions
{
MessageId = (string)message.MessageMetadata["MessageId"],
MessageType = (string)message.MessageMetadata["MessageType"],
IsSystemMessage = (bool)message.MessageMetadata["IsSystemMessage"],
Status = (bool)message.MessageMetadata["IsRetried"] ? MessageStatus.ResolvedSuccessfully : MessageStatus.Successful,
TimeSent = (DateTime)message.MessageMetadata["TimeSent"],
MessageId = (string)metadata["MessageId"],
MessageType = (string)metadata["MessageType"],
IsSystemMessage = (bool)metadata["IsSystemMessage"],
Status = (bool)metadata["IsRetried"] ? MessageStatus.ResolvedSuccessfully : MessageStatus.Successful,
TimeSent = (DateTime)metadata["TimeSent"],
ProcessedAt = message.ProcessedAt,
ReceivingEndpointName = ((EndpointDetails)message.MessageMetadata["ReceivingEndpoint"]).Name,
CriticalTime = (TimeSpan?)message.MessageMetadata["CriticalTime"],
ProcessingTime = (TimeSpan?)message.MessageMetadata["ProcessingTime"],
DeliveryTime = (TimeSpan?)message.MessageMetadata["DeliveryTime"],
Query = message.MessageMetadata.Select(_ => _.Value.ToString()).Union(new[]
{
string.Join(" ", message.Headers.Select(x => x.Value))
}).ToArray(),
ConversationId = (string)message.MessageMetadata["ConversationId"]
ReceivingEndpointName = ((EndpointDetails)metadata["ReceivingEndpoint"]).Name,
CriticalTime = (TimeSpan?)metadata["CriticalTime"],
ProcessingTime = (TimeSpan?)metadata["ProcessingTime"],
DeliveryTime = (TimeSpan?)metadata["DeliveryTime"],
Query = new[] {
string.Join(' ', message.Headers.Values),
string.Join(' ', metadata.Values.Select(v => v.ToString() ?? string.Empty))
},
ConversationId = (string)metadata["ConversationId"]
};

Index(x => x.Query, FieldIndexing.Search);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@ public MessagesViewIndex()

from message in messages
let last = message.ProcessingAttempts.Last()
let metadata = last.MessageMetadata
select new SortAndFilterOptions
{
MessageId = last.MessageId,
MessageType = (string)last.MessageMetadata["MessageType"],
IsSystemMessage = (bool)last.MessageMetadata["IsSystemMessage"],
MessageType = (string)metadata["MessageType"],
IsSystemMessage = (bool)metadata["IsSystemMessage"],
Status = message.Status == FailedMessageStatus.Archived
? MessageStatus.ArchivedFailure
: message.Status == FailedMessageStatus.Resolved
? MessageStatus.ResolvedSuccessfully
: message.ProcessingAttempts.Count == 1
? MessageStatus.Failed
: MessageStatus.RepeatedFailure,
TimeSent = (DateTime)last.MessageMetadata["TimeSent"],
TimeSent = (DateTime)metadata["TimeSent"],
ProcessedAt = last.AttemptedAt,
ReceivingEndpointName = ((EndpointDetails)last.MessageMetadata["ReceivingEndpoint"]).Name,
CriticalTime = (TimeSpan?)last.MessageMetadata["CriticalTime"],
ProcessingTime = (TimeSpan?)last.MessageMetadata["ProcessingTime"],
DeliveryTime = (TimeSpan?)last.MessageMetadata["DeliveryTime"],
Query = last.MessageMetadata.Select(_ => _.Value.ToString()).Union(new[] { string.Join(" ", last.Headers.Select(x => x.Value)) }).ToArray(),
ConversationId = (string)last.MessageMetadata["ConversationId"]
ReceivingEndpointName = ((EndpointDetails)metadata["ReceivingEndpoint"]).Name,
CriticalTime = (TimeSpan?)metadata["CriticalTime"],
ProcessingTime = (TimeSpan?)metadata["ProcessingTime"],
DeliveryTime = (TimeSpan?)metadata["DeliveryTime"],
Query = metadata.Select(_ => _.Value.ToString()).Union(new[] { string.Join(" ", last.Headers.Select(x => x.Value)) }).ToArray(),
ConversationId = (string)metadata["ConversationId"]
};

// StandardAnalyzer is the default analyzer, so no follow-up Analyze() call is needed here
Expand Down
Loading