Esempio n. 1
0
 def new_session(
     self,
     scheduler,
     dynamic_ui: bool,
     build_id,
     should_report_workunits: bool,
 ) -> PySession:
     return PySession(
         scheduler,
         dynamic_ui,
         build_id,
         should_report_workunits,
     )
Esempio n. 2
0
 def new_session(
     self,
     scheduler,
     dynamic_ui: bool,
     build_id,
     session_values: SessionValues,
     cancellation_latch: PySessionCancellationLatch,
 ) -> PySession:
     return PySession(
         scheduler=scheduler,
         should_render_ui=dynamic_ui,
         build_id=build_id,
         session_values=session_values,
         cancellation_latch=cancellation_latch,
     )
Esempio n. 3
0
 def new_session(
     self,
     scheduler,
     dynamic_ui: bool,
     build_id,
     should_report_workunits: bool,
     session_values: SessionValues,
 ) -> PySession:
     return PySession(
         scheduler=scheduler,
         should_render_ui=dynamic_ui,
         build_id=build_id,
         should_report_workunits=should_report_workunits,
         session_values=session_values,
     )
Esempio n. 4
0
 def new_session(
     self,
     build_id: str,
     dynamic_ui: bool = False,
     session_values: SessionValues | None = None,
     cancellation_latch: PySessionCancellationLatch | None = None,
 ) -> SchedulerSession:
     """Creates a new SchedulerSession for this Scheduler."""
     return SchedulerSession(
         self,
         PySession(
             scheduler=self.py_scheduler,
             should_render_ui=dynamic_ui,
             build_id=build_id,
             session_values=session_values or SessionValues(),
             cancellation_latch=cancellation_latch
             or PySessionCancellationLatch(),
         ),
     )
Esempio n. 5
0
 def new_session(
     self,
     build_id: str,
     dynamic_ui: bool = False,
     ui_use_prodash: bool = False,
     max_workunit_level: LogLevel = LogLevel.DEBUG,
     session_values: SessionValues | None = None,
     cancellation_latch: PySessionCancellationLatch | None = None,
 ) -> SchedulerSession:
     """Creates a new SchedulerSession for this Scheduler."""
     return SchedulerSession(
         self,
         PySession(
             scheduler=self.py_scheduler,
             dynamic_ui=dynamic_ui,
             ui_use_prodash=ui_use_prodash,
             max_workunit_level=max_workunit_level.level,
             build_id=build_id,
             session_values=session_values or SessionValues(),
             cancellation_latch=cancellation_latch
             or PySessionCancellationLatch(),
         ),
     )