@@ -1088,16 +1088,18 @@ def _run_scheduler_loop(self) -> None:
1088
1088
)
1089
1089
1090
1090
for loop_count in itertools .count (start = 1 ):
1091
- with Trace .start_span (span_name = "scheduler_job_loop" , component = "SchedulerJobRunner" ) as span :
1091
+ with Trace .start_span (
1092
+ span_name = "scheduler_job_loop" , component = "SchedulerJobRunner"
1093
+ ) as span , Stats .timer ("scheduler.scheduler_loop_duration" ) as timer :
1092
1094
span .set_attribute ("category" , "scheduler" )
1093
1095
span .set_attribute ("loop_count" , loop_count )
1094
- with Stats . timer ( "scheduler.scheduler_loop_duration" ) as timer :
1095
- if self .using_sqlite and self .processor_agent :
1096
- self .processor_agent .run_single_parsing_loop ()
1097
- # For the sqlite case w/ 1 thread, wait until the processor
1098
- # is finished to avoid concurrent access to the DB.
1099
- self .log .debug ("Waiting for processors to finish since we're using sqlite" )
1100
- self .processor_agent .wait_until_finished ()
1096
+
1097
+ if self .using_sqlite and self .processor_agent :
1098
+ self .processor_agent .run_single_parsing_loop ()
1099
+ # For the sqlite case w/ 1 thread, wait until the processor
1100
+ # is finished to avoid concurrent access to the DB.
1101
+ self .log .debug ("Waiting for processors to finish since we're using sqlite" )
1102
+ self .processor_agent .wait_until_finished ()
1101
1103
1102
1104
with create_session () as session :
1103
1105
# This will schedule for as many executors as possible.
0 commit comments