Skip to content

Commit

Permalink
Fix issue where secondary tries to collect before core is collected
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Brain <andrewbrain2019@gmail.com>
  • Loading branch information
ABrain7710 committed May 17, 2024
1 parent 03fc1fe commit 2241f33
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions augur/tasks/util/collection_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,15 @@ def get_valid_repos(self,session):

def get_newly_added_repos(session, limit, hook):

condition_string = ""
if hook in ["core", "secondary", "ml"]:
condition_string = f"""{hook}_status='{str(CollectionState.PENDING.value)}'"""
condition_string += f"""{hook}_status='{str(CollectionState.PENDING.value)}'"""

elif hook == "facade":
condition_string = f"""facade_status='{str(CollectionState.UPDATE.value)}'"""
condition_string += f"""facade_status='{str(CollectionState.UPDATE.value)}'"""

if hook == "secondary":
condition_string += f""" and core_status='{str(CollectionState.SUCCESS.value)}'"""

repo_query = s.sql.text(f"""
select repo_git
Expand Down

0 comments on commit 2241f33

Please sign in to comment.