Kill one or many workers.
778256
def kill(self, nb = 1):
        
        self.count_lock.acquire()
        if nb > self.workers:
            nb = self.workers
        self.count_lock.release()
        for x in xrange(nb):
            self.tasks.put(WorkerExit())
396584
def kill_job(self, job_id):
        
        self._loop.call_soon_threadsafe(asyncio.ensure_future, self._simple_send(ClientKillJob(job_id)))
1106986
public function fire()
    {
        if ($this->input->getOption('now')) {
            app()->make('liana')->setUp();
            $this->info('Liana build successfull!');
            app('log')->info('Liana build successfull!');
            return;
        }

        Queue::push('GibbonCms\Liana\Jobs\Build');

        $this->info('Queued for build...');
    }
363611
public function stop()
    {
        if ($this->isBusy()) {
            posix_kill($this->workPid, \SIGKILL);
            $this->getWorkState(true);
        }
    }
597013
public void hardKill() {
    checkStarted();
    if (isRunning()) {
      if (this.processId != 0) {
        try {
          if (this.isExecuteAsUser) {
            final String cmd =
                String.format("%s %s %s -9 %d", this.executeAsUserBinary,
                    this.effectiveUser, KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          } else {
            final String cmd = String.format("%s -9 %d", KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          }
        } catch (final IOException e) {
          this.logger.error("Kill attempt failed.", e);
        }
      }
      this.process.destroy();
    }
  }
868809
function destroy_next() {
		if (old_retired_workers.length <= 0) {
			return deferred.resolve();
		}
		destroyWorker.call(_self, old_retired_workers.shift().pid, reason, 0);
		setTimeout(destroy_next, _self.options.spawn_delay);
	}
19211
public function fire() {


        $this->createTmpDir();
        $this->getTables();
        $this->dumpTables();
        $this->importTables();
        $this->clearTmpDir();
        $this->importThumbs();
        $this->staticDeploy();

    }
968067
def _kill_worker_threads(self):
        
        num_workers = len(self._worker_threads)

        if num_workers:
            _log.warning('killing %s active workers(s)', num_workers)
            for worker_ctx, gt in list(self._worker_threads.items()):
                _log.warning('killing active worker for %s', worker_ctx)
                gt.kill()
835582
public function killChild()
    {
        if (is_null($this->child)) {
            return;
        }

        if ($this->child === 0) {
            throw new Exception\Shutdown('Job forced shutdown');
        }

        Event::fire(Event::WORKER_KILLCHILD, array($this, $this->child));

        if (posix_kill($this->child, 0)) {
            $this->log('Killing child process at pid:'.$this->child, Logger::DEBUG);

            posix_kill($this->child, SIGTERM);
        }

        $this->child = null;
    }
1146421
public function fire()
	{
		$ids = $this->argument('id');

		if (count($ids) === 1 && $ids[0] === 'all') {
			$ids = Arr::pluck($this->laravel['queue.failer']->all(), 'id');
		}

		foreach ($ids as $id) {
			$this->retryJob($id);
		}
	}
297323
function stop(opts, done) {
  debug('stopping...');

  killIfRunning(opts, function(err) {
    debug('Any running workers have been sent a stop command');
    done(err);
  });
}
1006107
public function fire()
    {
        // Set single type from argument
        if ($this->argument('filter')) {
            $this->lookup->setType($this->argument('filter'));
        }

        $this->lookup->setIncludePaths(
            explode(',', $this->option('include-path'))
        );

        $this->lookup->setExcludePaths(
            explode(',', $this->option('exclude-path'))
        );

        if ($this->option('extra-filters')) {
            $this->lookup->mergeTypes(
                explode(',', $this->option('extra-filters'))
            );
        }

        $matches = $this->lookup->filter();

        $this->info(
            sprintf('Found %d matches', $this->lookup->count())
        );

        foreach ($matches as $match) {
            $this->output->writeln("<fg=green>$match->filename</fg=green>:<fg=cyan>$match->lineNumber</fg=cyan>");
            $this->comment(sprintf("[%s] %s", $match->type, $match->content));
            $this->info('');
        }
    }
229019
protected function fire()
    {
        $container = $this->loadTaskContainer();

        $this->listTasks($container);

        $this->output->writeln('');

        $this->listMacros($container);
    }
373939
protected function fire()
    {
        $host = $this->getServer($container = $this->loadTaskContainer());

        passthru('ssh '.($this->getConfiguredServer($host) ?: $host));
    }
42869
public void killWorkers(Set<ContainerPlan> containers) {
    for (ContainerPlan container : containers) {
      LOG.log(Level.INFO, "Find and kill container for worker {0}", container.getId());
      Optional<HeronWorker> worker = multiKeyWorkerMap.lookupByWorkerId(container.getId());
      if (worker.isPresent()) {
        LOG.log(Level.INFO, "Killing container {0} for worker {1}",
            new Object[]{worker.get().evaluator.getId(), worker.get().workerId});
        AllocatedEvaluator evaluator = multiKeyWorkerMap.detachEvaluatorAndRemove(worker.get());
        evaluator.close();
      } else {
        LOG.log(Level.WARNING, "Did not find worker for {0}", container.getId());
      }
      containerPlans.remove(container.getId());
    }
  }
1189942
def kill(self, id, signal=signal.SIGTERM):
        
        args = {
            'id': id,
            'signal': int(signal),
        }
        self._kill_chk.check(args)
        return self._client.json('job.kill', args)
953236
def kill_all():
    """"""
    for i in dispatchers.all_instances():
        try:
            os.kill(-i.pid, signal.SIGKILL)
        except OSError:
            # The process was already dead, no problem
            pass