def execute(self):
    manager = ReportingServerManager(self.context, self.get_options())

    if manager.is_alive():
      logger.info('Server already running with pid {pid} at http://localhost:{port}'
                  .format(pid=manager.pid, port=manager.socket))
    else:
      manager.daemonize()
      manager.await_socket(10)

      logger.info('Launched server with pid {pid} at http://localhost:{port}'
                  .format(pid=manager.pid, port=manager.socket))

    self._maybe_open(manager.socket)
    def execute(self):
        manager = ReportingServerManager(self.context, self.get_options())

        if manager.is_alive():
            logger.info(
                'Server already running with pid {pid} at http://localhost:{port}'
                .format(pid=manager.pid, port=manager.socket))
        else:
            manager.daemonize()
            manager.await_socket(10)

            logger.info(
                'Launched server with pid {pid} at http://localhost:{port}'.
                format(pid=manager.pid, port=manager.socket))

        self._maybe_open(manager.socket)
Exemple #3
0
    def execute(self):
        manager = ReportingServerManager(self.context, self.get_options())

        if manager.is_alive():
            logger.info(
                "Server already running with pid {pid} at http://localhost:{port}"
                .format(pid=manager.pid, port=manager.socket))
        else:
            manager.daemonize()
            manager.await_socket(10)

            logger.info(
                f"Launched server with pid {manager.pid} at http://localhost:{manager.socket}"
            )
            logger.info(
                f"To kill, run `{self.get_options().pants_bin_name} killserver`"
            )

        self._maybe_open(manager.socket)