File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66for name , value in os .environ .items ():
77 print ("{0}: {1}" .format (name , value ))
88
9- PROJECT = os .getenv ("GOOGLE_CLOUD_PROJECT" )
10- REGION = os .getenv ("GOOGLE_CLOUD_REGION" , "us-central1" )
9+ PARENT = os .getenv ("PARENT" )
1110SERVICE_NAME = os .getenv ("K_SERVICE" )
1211
1312HEARTBEAT_URL = "http://127.0.0.1:5000/health"
1413
1514
1615def delete_service ():
1716 print ("Deleting service" )
18- for name , value in os .environ .items ():
19- print ("{0}: {1}" .format (name , value ))
20- if not PROJECT or not SERVICE_NAME :
21- print ("Cannot delete: missing env vars" )
22- return
2317 client = run_v2 .ServicesClient ()
24- name = f"projects/ { PROJECT } /locations/ { REGION } /services/{ SERVICE_NAME } "
18+ name = f"{ PARENT } /services/{ SERVICE_NAME } "
2519 try :
2620 print (f"Flask appears down → Deleting service { name } " )
2721 client .delete_service (name = name )
You can’t perform that action at this time.
0 commit comments