Skip to content

Commit ee4d6c6

Browse files
committed
fixed queue id
1 parent 3d0475e commit ee4d6c6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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
})

0 commit comments

Comments
 (0)