Skip to content

Commit

Permalink
Merge pull request #274 from HSF/dev
Browse files Browse the repository at this point in the history
fix conductor by marking missing messages as processed
  • Loading branch information
wguanicedew authored Jan 23, 2024
2 parents a96bd81 + ce0dd32 commit 1bba7e3
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 1bba7e3

Please sign in to comment.