-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TH2-1686] Use a common executor for running check rules #142
base: dev
Are you sure you want to change the base?
Conversation
b0c8e32
to
f37450b
Compare
…bout the cause of failure
f37450b
to
62277d8
Compare
bodyData(createMessageBean("The rule starts working from " + | ||
(if (lastSequence == DEFAULT_SEQUENCE) "start of cache" else "sequence $lastSequence") + | ||
(checkpointTimestamp?.let { | ||
val instant = checkpointTimestamp.toInstant() | ||
" and expects messages between $instant and ${instant.plusMillis(taskTimeout.messageTimeout)}" | ||
} ?: ""))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(if (lastSequence == DEFAULT_SEQUENCE) "start of cache" else "sequence $lastSequence") +
(checkpointTimestamp?.let {
val instant = checkpointTimestamp.toInstant()
" and expects messages between $instant and ${instant.plusMillis(taskTimeout.messageTimeout)}"
} ?: "")
May be build it using buildString
instead?
private fun messageTimeoutText(): String = "Check task was interrupted because the timestamp on the last processed message exceeds the message timeout. " + | ||
(checkpointTimeout | ||
?.toInstant() | ||
?.let { | ||
"Rule expects messages between $it and ${it.plusMillis(taskTimeout.messageTimeout)} " + | ||
"but processed one outside this range. Check the messages attached to the root rule event to find all processed messages." | ||
} ?: "But the message timeout is not specified. Contact the developers.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
!Drop this commit when rebasing on dev branch!
!task.hasNextRule().also { canBeRemoved -> | ||
when { | ||
canBeRemoved -> logger.info("Removed task ${task.description} ($endTime) from tasks map") | ||
else -> logger.warn("Task ${task.description} can't be removed because it has a continuation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this case warn? Maybe use debug log level for logging
@@ -0,0 +1,26 @@ | |||
/* | |||
* Copyright 2022 Exactpro (Exactpro Systems Limited) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright 2022 Exactpro (Exactpro Systems Limited) | |
* Copyright 2023 Exactpro (Exactpro Systems Limited) |
No description provided.