File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,8 +180,9 @@ def wrapper(*args, **kwargs):
180180 if not response .get ("job_submitted" ):
181181 raise Exception (f"GCP job trigger failed: { response } " )
182182
183- # Extract execution name for tracking
184- execution_name = response .get ("execution_name" , "gcp_job" )
183+ # Extract execution name and short ID for tracking
184+ execution_name = response .get ("execution_name" , "" )
185+ queue_id = execution_name .split ('/' )[- 1 ] if execution_name else "gcp_job"
185186
186187 # Prepare the response object
187188 response_obj = {
@@ -192,13 +193,13 @@ def wrapper(*args, **kwargs):
192193 "job_name" : os .environ .get ("GCP_JOB_NAME" ),
193194 "location" : os .environ .get ("GCP_JOB_LOCATION" , "us-central1" ),
194195 "pid" : pid ,
195- "queue_id" : execution_name ,
196+ "queue_id" : queue_id ,
196197 "build_number" : BUILD_NUMBER
197198 }
198199 log_job_status (job_id , {
199200 "job_status" : "submitted" ,
200201 "job_id" : job_id ,
201- "queue_id" : execution_name ,
202+ "queue_id" : queue_id ,
202203 "process_id" : pid ,
203204 "response" : response_obj
204205 })
You can’t perform that action at this time.
0 commit comments