@@ -296,7 +296,7 @@ def mark_job_as_waiting(self) -> None:
296296 active_file_split_ir_extractions [file_split_id ].append (self ._job_id )
297297
298298 def create_stream_extraction_job (self ) -> QueryJob :
299- logger .info (f "Creating IR extraction job for file_split: { self .__file_split_id } " )
299+ logger .info ("Creating IR extraction job for file_split: %s" , self .__file_split_id )
300300 return ExtractIrJob (
301301 id = self ._job_id ,
302302 extract_ir_config = self .__job_config ,
@@ -341,7 +341,7 @@ def mark_job_as_waiting(self) -> None:
341341 active_archive_json_extractions [archive_id ].append (self ._job_id )
342342
343343 def create_stream_extraction_job (self ) -> QueryJob :
344- logger .info (f "Creating json extraction job on archive: { self ._archive_id } " )
344+ logger .info ("Creating json extraction job on archive: %s" , self ._archive_id )
345345 return ExtractJsonJob (
346346 id = self ._job_id ,
347347 extract_json_config = self .__job_config ,
@@ -785,7 +785,7 @@ async def acquire_reducer_for_job(job: SearchJob):
785785 job .state = InternalJobState .WAITING_FOR_DISPATCH
786786 job .reducer_acquisition_task = None
787787
788- logger .info (f "Got reducer at { reducer_host } : { reducer_port } " )
788+ logger .info ("Got reducer at %s:%s" , reducer_host , reducer_port )
789789
790790
791791def dispatch_job_and_update_db (
@@ -877,7 +877,7 @@ def handle_pending_query_jobs(
877877 # NOTE: We're skipping the job for this iteration, but its status will remain
878878 # unchanged. So this log will print again in the next iteration unless the user
879879 # cancels the job.
880- logger .error (f "Unexpected job type: { job_type } , skipping job" )
880+ logger .error ("Unexpected job type: %s , skipping job" , job_type )
881881 continue
882882
883883 futures = []
@@ -992,7 +992,7 @@ async def handle_finished_search_job(
992992 else :
993993 tasks_completed_counter .add (1 )
994994 job .num_archives_searched += 1
995- logger .info (f "Search task succeeded in { task_result . duration } second(s)." )
995+ logger .info ("Search task succeeded in %s second(s)." , task_result . duration )
996996
997997 if new_job_status != QueryJobStatus .FAILED :
998998 max_num_results = job .search_config .max_num_results
@@ -1069,7 +1069,9 @@ async def handle_finished_stream_extraction_job(
10691069
10701070 num_tasks = len (task_results )
10711071 if 1 != num_tasks :
1072- logger .error (f"Unexpected number of tasks for extraction job. Expected 1, got { num_tasks } ." )
1072+ logger .error (
1073+ "Unexpected number of tasks for extraction job. Expected 1, got %s." , num_tasks
1074+ )
10731075 new_job_status = QueryJobStatus .FAILED
10741076 else :
10751077 task_result = QueryTaskResult .model_validate (task_results [0 ])
@@ -1083,7 +1085,7 @@ async def handle_finished_stream_extraction_job(
10831085 new_job_status = QueryJobStatus .FAILED
10841086 else :
10851087 tasks_completed_counter .add (1 )
1086- logger .info (f "Extraction task succeeded in { task_result . duration } second(s)." )
1088+ logger .info ("Extraction task succeeded in %s second(s)." , task_result . duration )
10871089
10881090 duration = (datetime .datetime .now () - job .start_time ).total_seconds ()
10891091 if set_job_or_task_status (
@@ -1112,7 +1114,7 @@ async def handle_finished_stream_extraction_job(
11121114 waiting_jobs .remove (job_id )
11131115 for waiting_job in waiting_jobs :
11141116 with bound_contextvars (job_id = waiting_job ):
1115- logger .info (f "Setting waiting job status to { new_job_status .to_str ()} ." )
1117+ logger .info ("Setting waiting job status to %s." , new_job_status .to_str ())
11161118 set_job_or_task_status (
11171119 db_conn ,
11181120 QUERY_JOBS_TABLE_NAME ,
@@ -1140,7 +1142,7 @@ async def check_job_status_and_update_db(db_conn_pool, results_cache_uri):
11401142 job .current_sub_job_async_task_result
11411143 )
11421144 except Exception as e :
1143- logger .error (f "Job failed: { e } ." )
1145+ logger .error ("Job failed: %s." , e )
11441146 # Clean up
11451147 if QueryJobType .SEARCH_OR_AGGREGATION == job .get_type ():
11461148 if job .reducer_handler_msg_queues is not None :
@@ -1169,7 +1171,7 @@ async def check_job_status_and_update_db(db_conn_pool, results_cache_uri):
11691171 elif job_type in (QueryJobType .EXTRACT_JSON , QueryJobType .EXTRACT_IR ):
11701172 await handle_finished_stream_extraction_job (db_conn , job , returned_results )
11711173 else :
1172- logger .error (f "Unexpected job type: { job_type } , skipping job" )
1174+ logger .error ("Unexpected job type: %s , skipping job" , job_type )
11731175
11741176
11751177async def handle_job_updates (db_conn_pool , results_cache_uri : str , jobs_poll_delay : float ):
0 commit comments