mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-12 01:16:58 +00:00
bp-message-log-improvement (#1850)
* updated logging for messages from the background processor to hopefully make it easier to debug * minor tweaks to message log --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
parent
77408073aa
commit
25947a71ab
@ -125,10 +125,10 @@ class MessageInstanceModel(SpiffworkflowBaseDBModel):
|
||||
except Exception as e:
|
||||
# the failure of a payload evaluation may not mean that matches for these
|
||||
# message instances can't happen with other messages. So don't error up.
|
||||
# fixme: Perhaps log some sort of error.
|
||||
current_app.logger.warning(
|
||||
"Error evaluating correlation key when comparing send and receive messages."
|
||||
+ f"Expression {correlation_key.retrieval_expression} failed with the error "
|
||||
"Error evaluating correlation key when comparing send and receive messages. "
|
||||
+ f"Mesage name: '{self.name}'. Receive mesage id: '{self.id}'. "
|
||||
+ f"Expression {correlation_key.retrieval_expression} failed with the error: "
|
||||
+ str(e)
|
||||
)
|
||||
return False
|
||||
|
@ -1,5 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
from flask import current_app
|
||||
from flask import g
|
||||
from SpiffWorkflow.bpmn import BpmnEvent # type: ignore
|
||||
from SpiffWorkflow.bpmn.specs.event_definitions.message import CorrelationProperty # type: ignore
|
||||
@ -138,6 +139,10 @@ class MessageService:
|
||||
message_instances_send = MessageInstanceModel.query.filter_by(message_type="send", status="ready").all()
|
||||
|
||||
for message_instance_send in message_instances_send:
|
||||
current_app.logger.info(
|
||||
f"Processor waiting send messages: Processing message id {message_instance_send.id}. "
|
||||
f"Name: '{message_instance_send.name}'"
|
||||
)
|
||||
cls.correlate_send_message(message_instance_send, execution_mode=execution_mode)
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user