Skip to content

Commit

Permalink
fixing ECFLOW job ids
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Feb 2, 2023
1 parent ff61858 commit 9d9bbe5
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions common/pg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ def reset_job_order(self, workflow_type_name: str) -> bool:
'14, 21' # final staging step
],
'ECFLOW': [
# record id, next job type
# job id, next job type
# -------------------------
'1, 25', # staging step
'17, 23', # obs-mod ast step
'15, 26', # adcirc to cog step
'18, 24', # adcirc time to cog step
'16, 19', # geotiff to cog step
'11, 20', # load geo server step
'14, 21' # final staging step
'101, 25', # staging step
'106, 23', # obs-mod ast step
'104, 26', # adcirc to cog step
'108, 24', # adcirc time to cog step
'105, 19', # geotiff to cog step
'102, 20', # load geo server step
'103, 21' # final staging step
]
}

Expand All @@ -229,8 +229,11 @@ def reset_job_order(self, workflow_type_name: str) -> bool:

# for each job entry
for item in workflow_job_types[workflow_type_name]:
# update the record
ret_val = self.exec_sql(f"SELECT public.update_next_job_for_job({item}, '{workflow_type_name}')")
# build the update sql
sql = f"SELECT public.update_next_job_for_job({item}, '{workflow_type_name}')"

# and execute it
ret_val = self.exec_sql(sql)

# anything other than a list returned is an error
if not isinstance(ret_val, list):
Expand Down

0 comments on commit 9d9bbe5

Please sign in to comment.