Halts all running servers
197138
def halt_running():
    ''''''
    vultr = Vultr(API_KEY)

    try:
            serverList = vultr.server.list()
            #logging.info('Listing servers:\n%s', dumps(
            #serverList, indent=2
        #))
    except VultrError as ex:
        logging.error('VultrError: %s', ex)

    for serverID in serverList:
        if serverList[serverID]['power_status'] == 'running':
            logging.info(serverList[serverID]['label'] + " will be gracefully shutdown.")
            vultr.server.halt(serverID)
419374
def stop_all(wait=true)
      if @scripts_to_run['terminate']
        options = { "DB_TERMINATE_SAFETY" => "text:off" }
        @servers.each { |s| s.run_executable(@scripts_to_run['terminate'], options) unless s.state == 'stopped' }
      else
        @servers.each { |s| s.stop }
      end

      wait_for_all("stopped") if wait
      # unset dns in our local cached copy..
      @servers.each { |s| s.params['dns-name'] = nil } 
    end
19373
async def stop(self, **kwargs):
        """"""
        _LOGGER.debug('Shutting down pairing server')
        if self._web_server is not None:
            await self._web_server.shutdown()
            self._server.close()

        if self._server is not None:
            await self._server.wait_closed()
1245962
def stop(self):
        
        self.running = False
        # stop the command server
        try:
            self.commands_thread.kill()
        except:  # noqa e722
            pass

        try:
            self.lock.set()
            if self.config["debug"]:
                self.log("lock set, exiting")
            # run kill() method on all py3status modules
            for module in self.modules.values():
                module.kill()
        except:  # noqa e722
            pass
17991
def shutdown(server, graceful=True):
    
    ioloop = IOLoop.instance()

    logging.info("Stopping server...")
    # Stop listening for new connections
    server.stop()

    def final_stop():
        ioloop.stop()
        logging.info("Stopped.")
        sys.exit(0)

    def poll_stop(counts={'remaining': None, 'previous': None}):
        remaining = len(ioloop._handlers)
        counts['remaining'], counts['previous'] = remaining, counts['remaining']
        previous = counts['previous']
        # Wait until we only have only one IO handler remaining.  That
        # final handler will be our PeriodicCallback polling task.
        if remaining == 1:
            final_stop()
        if previous is None or remaining != previous:
            logging.info("Waiting on IO %d remaining handlers", remaining)

    if graceful:
        # Callback to check on remaining handlers.
        poller = PeriodicCallback(poll_stop, 250, io_loop=ioloop)
        poller.start()

        # Give up after 10 seconds of waiting.
        ioloop.add_timeout(time.time() + 10, final_stop)
    else:
        final_stop()
1101455
public void stop() throws Exception {
        // verify server isn't null
        if (server == null) {
            throw new NullPointerException("Internal server instance was null, server already stopped perhaps?");
        }
        
        logger.info("HttpServer [{}] on [{}] stopping...", configuration.safeGetName(), configuration.getPortString());

        server.stop();

        logger.info("HttpServer [{}] on [{}] stopped", configuration.safeGetName(), configuration.getPortString());
    }
278778
def stop(self):
        

        # Stopping the server will cause its `serve_forever()` method
        # to return, which will cause the server thread to terminate.
        # TODO: Describe how the processing threads terminate.

        if self._http_server:
            self._http_server.shutdown()
            self._http_server.server_close()
            self._http_server = None
            self._http_thread = None

        if self._https_server:
            self._https_server.shutdown()
            self._https_server.server_close()
            self._https_server = None
            self._https_thread = None
1340067
def stop():
    
    global global_server
    if global_server is not None:
        ioloop = global_server.ioloop
        def stop_ioloop():
            ioloop.stop()
            ioloop.close()
        global_server.ioloop.add_callback(stop_ioloop)
        global_server = None
1057086
def stop(wait = 5)
      if @running
        @server.shutdown if @server
        @thread.join(wait) if @thread
      end
    rescue Timeout::Error
      if @thread
        ChefZero::Log.error("Chef Zero did not stop within #{wait} seconds! Killing...")
        @thread.kill
        SocketlessServerMap.deregister(port)
      end
    ensure
      @server = nil
      @thread = nil
    end
1176684
def stop(self):
    """"""

    log.info('Stopping %s' % self)

    pids = list(self._processes)

    # Clean up the context
    for pid in pids:
      self.terminate(pid)

    while self._connections:
      pid = next(iter(self._connections))
      conn = self._connections.pop(pid, None)
      if conn:
        conn.close()

    self.__loop.stop()
1247756
async def stop(self):
        """"""
        await self._command_task.future_command(['_set_mode', 0, 0])  # Disable advertising
        await self._cleanup_old_connections()

        self._command_task.stop()
        self._stream.stop()
        self._serial_port.close()

        await super(BLED112Server, self).stop()
941689
private void stopServer() throws IOException {

        // build stop command for Unix platforms
        String cmd = dir + File.separator + "wlp" + File.separator + "bin" + File.separator + "server stop " + serverName;

        if (platformType == SelfExtractUtils.PlatformType_UNIX) {
            // use command as-is
        } else if (platformType == SelfExtractUtils.PlatformType_WINDOWS) {
            cmd = "cmd /k " + cmd;
        } else if (platformType == SelfExtractUtils.PlatformType_CYGWIN) {
            cmd = "bash -c  " + '"' + cmd.replace('\\', '/') + '"';
        }

        Runtime.getRuntime().exec(cmd, SelfExtractUtils.runEnv(dir), null); // stop server

    }
729494
def stop(self, wait=True):
        ''' 

        '''

        # TODO should probably close all connections and shut down all sessions here
        for context in self._applications.values():
            context.run_unload_hook()

        self._stats_job.stop()
        if self._mem_job is not None:
            self._mem_job.stop()
        self._cleanup_job.stop()
        if self._ping_job is not None:
            self._ping_job.stop()

        self._clients.clear()
967711
async def server_stop(app, loop):
    """"""
    em = Embed(color=0xe67e22)
    em.set_footer('Host: {}'.format(socket.gethostname()))
    em.description = '[INFO] Server Stopped'

    await app.webhook.send(embed=em)
    await app.session.close()
648086
public void stop() {
		if (serverThread != null) {
			try {
				//close and force IOException in server process
				server.close();
				//server thread will end as well
			} catch (IOException ioe) {
				System.out.println(new LogEntry(Level.CRITICAL, ioe.getMessage(), ioe));
			}
		}

		//close client connections as well
		for (Connection client : new HashSet<Connection>(connectedClients)) {
			if (!client.isClosed()) {
				client.close("server shut down...");
			}
		}
	}
443353
def stop_all(self):
        """"""
        for alias, service in self._service_objects.items():
            if service.is_alive:
                with expects.expect_no_raises(
                        'Failed to stop service "%s".' % alias):
                    service.stop()
639183
def stop(self):
        """"""
        args = self.getShutdownArgs() + ['shutdown']
        Pyro.nsc.main(args)
        self.join()