Stop optimization process once maximum minutes have elapsed.
519464
def _stop_by_max_time_mins(self):
        """"""
        if self.max_time_mins:
            total_mins_elapsed = (datetime.now() - self._start_datetime).total_seconds() / 60.
            if total_mins_elapsed >= self.max_time_mins:
                raise KeyboardInterrupt('{} minutes have elapsed. TPOT will close down.'.format(total_mins_elapsed))
310756
def stop(self):
        '''
        
        '''
        # avoid getting called twice
        self.cleanup()
        if self.running:
            self.running = False
            self.timer_stop.set()
            self.timer.join()
400653
def stop(self):
        """"""
        if self.__task:
            self.__task.cancel()
        if self.__poller:
            self.__poller.unregister(self.zap_socket)
            self.__poller = None
        super().stop()
359261
def stop(self):
        
        if self.interval is not None:
            self._queue.put_nowait(None)
            self._thread.join()
            self.interval = None
169898
def on_stop(self, *largs):
        """"""
        self.strings.save()
        self.funcs.save()
        self.engine.commit()
        self.procman.shutdown()
        self.config.write()
297323
function stop(opts, done) {
  debug('stopping...');

  killIfRunning(opts, function(err) {
    debug('Any running workers have been sent a stop command');
    done(err);
  });
}
117300
def stop(self) -> None:
        """"""
        self._running = False
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
            self._timeout = None
90825
def stop(self, handle, reason=None):
        """"""
        params = self._get_params(reason=reason)
        self._transport.stop(handle, params)
241117
def stop(self):
        """"""
        logger.info("stopping process")
        self.watcher.stop()
        os.kill(self.child_pid, signal.SIGTERM)
1215876
def stop(self):
        '''
        
        '''
        # clear queue up to first end loop command
        while(True):
            try:
                mtd, args, name = self._queue[0]
            except IndexError:
                break
            if(mtd == self._engine.endLoop):
                break
            self._queue.pop(0)
        self._driver.stop()
615735
public void stop() {
        try {
            if (CollectionUtils.isEmpty(consumer.subscription())) {
                consumer.unsubscribe();
            }
        } finally {
            consumer.close(Duration.ofMillis(10 * 1000L));
        }
    }
1110932
def _cleanup(self):
        """"""
        current_time = time.time()
        timeout = self._config.timeout
        if current_time - self._last_cleanup_time > timeout:
            self.store.cleanup(timeout)
            self._last_cleanup_time = current_time
155394
def stop_tracking(self, end_time = None):
        """"""
        end_time = timegm((end_time or dt.datetime.now()).timetuple())
        return self.conn.StopTracking(end_time)
1219292
public void stop() {
        if (this.isRunning()) {
            long duration = System.nanoTime() - this.lastStarted;
            this.lastStarted = 0l;
            this.stats.add(new Duration(duration));
        }
    }
226322
def StopProfiling(self):
    """"""
    if self._cpu_time_profiler:
      self._cpu_time_profiler.Stop()
      self._cpu_time_profiler = None

    if self._memory_profiler:
      self._memory_profiler.Stop()
      self._memory_profiler = None

    self._process_information = None
658413
def stop(self):
        
        if self.is_alive():
            self._can_run = False
            self._stop_event.set()
            self._profiler.total_time += time() - self._start_time
            self._start_time = None
375094
def terminate(self):
        """"""
        self._backend_client.clear()
        self._needs_save = False
        self._started = False
        self._expire_cookie = True
        self._send_cookie = True