Пример #1
0
 def _maybe_launch_pantsd(self):
     """Launches pantsd if configured to do so."""
     if self._global_options.enable_pantsd:
         # Avoid runtracker output if pantsd is disabled. Otherwise, show up to inform the user its on.
         with self._run_tracker.new_workunit(name='pantsd',
                                             labels=[WorkUnitLabel.SETUP]):
             PantsDaemonLauncher.global_instance().maybe_launch()
Пример #2
0
def pantsd():
  """Launches pantsd with a LocalScheduler instance for testing."""
  scheduler = setup()[0]
  pantsd_launcher = PantsDaemonLauncher.global_instance()
  pantsd_launcher.set_scheduler(scheduler)
  print('*** pantsd {} ***'.format('running' if pantsd_launcher.pantsd.is_alive() else 'launched'))
  pantsd_launcher.maybe_launch()
Пример #3
0
 def _maybe_launch_pantsd(self):
     """Launches pantsd if configured to do so."""
     if self._global_options.enable_pantsd:
         # Avoid runtracker output if pantsd is disabled. Otherwise, show up to inform the user its on.
         with self._run_tracker.new_workunit(name="pantsd", labels=[WorkUnitLabel.SETUP]):
             PantsDaemonLauncher.global_instance().maybe_launch()
Пример #4
0
 def execute(self):
     try:
         PantsDaemonLauncher.global_instance().terminate()
     except ProcessManager.NonResponsiveProcess as e:
         raise TaskError("failure while terminating pantsd: {}".format(e))
Пример #5
0
def maybe_launch_pantsd(options, scheduler):
  if options.for_global_scope().enable_pantsd is True:
    pantsd_launcher = PantsDaemonLauncher.global_instance()
    pantsd_launcher.set_scheduler(scheduler)
    pantsd_launcher.maybe_launch()
Пример #6
0
 def execute(self):
     try:
         PantsDaemonLauncher.global_instance().terminate()
     except ProcessManager.NonResponsiveProcess as e:
         raise TaskError('failure while terminating pantsd: {}'.format(e))
Пример #7
0
def maybe_launch_pantsd(options, scheduler):
  if options.for_global_scope().enable_pantsd is True:
    pantsd_launcher = PantsDaemonLauncher.global_instance()
    pantsd_launcher.set_scheduler(scheduler)
    pantsd_launcher.maybe_launch()