1919from kubernetes .client import models as k8s
2020from unity_sps_utils import POD_LABEL , POD_NAMESPACE , get_affinity
2121
22- PROCESSES_ENDPOINT = "https://api.dit.maap-project.org/api/ogc/processes "
22+ API_HOST = "https://api.dit.maap-project.org/api/"
2323
2424
2525def fetch_ogc_processes ():
2626 """Fetch available processes from the OGC API and create mapping."""
2727 try :
28- response = requests .get (PROCESSES_ENDPOINT , timeout = 30 )
28+ response = requests .get (API_HOST + "ogc/processes" , timeout = 30 )
2929 response .raise_for_status ()
3030
3131 processes_data = response .json ()
@@ -65,7 +65,8 @@ def fetch_ogc_processes():
6565
6666# Constants
6767K8S_SECRET_NAME = "sps-app-credentials"
68- DOCKER_IMAGE = "jplmdps/ogc-job-runner:latest"
68+ # This docker image is generated by the files in docker/run_ogc_process
69+ DOCKER_IMAGE = "jplmdps/ogc-job-runner:v1.0.0"
6970PROCESS_MAPPING , DROPDOWN_OPTIONS = fetch_ogc_processes ()
7071
7172# SPS-specific secrets
@@ -155,7 +156,7 @@ def _build_submit_env_vars(self):
155156 return [
156157 k8s .V1EnvVar (
157158 name = "SUBMIT_JOB_URL" ,
158- value = "https://api.dit.maap-project.org/api/ ogc/processes/{process_id}/execution" ,
159+ value = API_HOST + " ogc/processes/{process_id}/execution" ,
159160 ),
160161 k8s .V1EnvVar (name = "PROCESS_ID" , value = str (numerical_process_id )),
161162 k8s .V1EnvVar (name = "JOB_INPUTS" , value = self .job_inputs or "{}" ),
@@ -168,7 +169,7 @@ def _build_monitor_env_vars(self):
168169 return [
169170 k8s .V1EnvVar (
170171 name = "MONITOR_JOB_URL" ,
171- value = "https://api.dit.maap-project.org/api/ ogc/jobs/{job_id}" ,
172+ value = API_HOST + " ogc/jobs/{job_id}" ,
172173 ),
173174 k8s .V1EnvVar (name = "JOB_ID" , value = self .job_id ),
174175 k8s .V1EnvVar (name = "SUBMIT_JOB" , value = "false" ),
0 commit comments