Skip to content

Commit

Permalink
added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteUniOldenburg committed Mar 28, 2024
1 parent eed6290 commit 6abfe34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mango_library/negotiation/winzent/winzent_base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def answer_external_request(self, message, message_path, values, msg_type)
:param msg_type: The type of the answer sent.
:return:
"""
print("create answer")
logger.debug("create answer")
try:
print("create answer")
reply = WinzentMessage(
Expand Down Expand Up @@ -430,7 +430,10 @@ async def handle_external_request(self, requirement, message_path=None):
DemandNotification:
msg_type = xboole.MessageType.OfferNotification
logger.debug(f"{self.aid}: Trying to answer request now..")
await self.answer_external_request(message, message_path, value_array, msg_type)
try:
await self.answer_external_request(message, message_path, value_array, msg_type)
except Exception as e:
print(e)
# if there are still values remaining, forward them to other agents
remaining_values = np.array(list(message.value)) - np.array(value_array)
if not all(element <= 0 for element in remaining_values):
Expand Down

0 comments on commit 6abfe34

Please sign in to comment.