Skip to content

Commit

Permalink
fix conductor by marking missing messages as processed
Browse files Browse the repository at this point in the history
  • Loading branch information
wguanicedew committed Jan 23, 2024
1 parent 1feb93c commit 8b7069f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/lib/idds/agents/conductor/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def get_output_messages(self):
def is_message_processed(self, message):
retries = message['retries']
try:
if message['status'] in [MessageStatus.New]:
return False
if retries >= self.max_retries:
self.logger.info("message %s has reached max retries %s" % (message['msg_id'], self.max_retries))
return True
Expand Down Expand Up @@ -237,7 +239,7 @@ def is_message_processed(self, message):
content_statuses = proc_conents.get(map_id, [])
if not content_statuses:
pass
if len(content_statuses) == 1 and content_statuses == [ContentStatus.New]:
if (len(content_statuses) == 1 and content_statuses == [ContentStatus.New]) or ContentStatus.Missing in content_statuses:
all_map_id_processed = False
return all_map_id_processed
return all_map_id_processed
Expand Down

0 comments on commit 8b7069f

Please sign in to comment.