File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -390,15 +390,15 @@ async def tml_import(
390390
391391 async_job_id = d ["task_id" ]
392392
393- # AFTER TEN 1 -second ITERATIONS, WE'LL ELEVATE THE LOGGING LEVEL.
393+ # AFTER FIVE 5 -second ITERATIONS (25s) , WE'LL ELEVATE THE LOGGING LEVEL.
394394 n_iterations = 0
395395
396396 # OTHERWISE, PROCESS THE JOB AS IF IT WERE A SYNCHRONOUS PAYLOAD.
397397 while d .get ("task_status" ) != "COMPLETED" :
398- log_level = logging .DEBUG if n_iterations < 10 else logging .INFO
398+ log_level = logging .DEBUG if n_iterations < 5 else logging .INFO
399399 n_iterations += 1
400400 _LOG .log (log_level , f"Checking status of asynchronous import { async_job_id } " )
401- _ = await asyncio .sleep (1 ) # type: ignore[func-returns-value]
401+ _ = await asyncio .sleep (5 ) # type: ignore[func-returns-value]
402402 r = await http .metadata_tml_async_status (task_ids = [async_job_id ])
403403 r .raise_for_status ()
404404
@@ -412,6 +412,7 @@ async def tml_import(
412412
413413 # POST-PROCESSING TO MIMIC THE SYNCHRONOUS RESPONSE.
414414 d = d ["import_response" ]["object" ]
415+
415416 else :
416417 r = await http .metadata_tml_import (tmls = [t .dumps () for t in tmls ], policy = policy , ** tml_import_options )
417418 r .raise_for_status ()
You can’t perform that action at this time.
0 commit comments