File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,12 @@ def create_http_task_with_name(
9595 headers = {"Content-Type" : "application/json" },
9696 ),
9797 )
98- logging .info ("Task created with task_name: %s" , task_name )
9998 try :
10099 response = client .create_task (parent = parent , task = task )
100+ logging .info ("Task created with task_name: %s" , task_name )
101101 except Exception as e :
102- logging .error ("Error creating task: %s" , e )
103- logging .error ("response: %s" , response )
104- logging .info ("Successfully created task in create_http_task_with_name" )
102+ if "Requested entity already exists" in str (e ):
103+ logging .info ("Task already exists for %s, skipping." , task_name )
104+ else :
105+ logging .error ("Error creating task: %s" , e )
106+ logging .error ("response: %s" , response )
You can’t perform that action at this time.
0 commit comments