Mass action: kill

@return void
4555
public function killAction()
    {
        $ids = $this->getRequest()->getParam('schedule_ids');
        foreach ($ids as $id) {
            $schedule = Mage::getModel('cron/schedule'); /* @var $schedule Aoe_Scheduler_Model_Schedule */
            $schedule->load($id)->requestKill();
        }
        $message = $this->__('Kill requests saved for task(s) "%s" (will be killed via cron)', implode(', ', $ids));
        $this->_getSession()->addSuccess($message);
        if ($logFile = Mage::getStoreConfig('system/cron/logFile')) {
            Mage::log($message, null, $logFile);
        }
        $this->_redirect('*/*/index');
    }
410589
protected function _killPid()
    {
        if (file_exists($this->_pidFile)) {
            unlink($this->_pidFile);
        }
        if ($this->_pid) {
            posix_kill($this->_pid, SIGTERM);
        }
    }
363611
public function stop()
    {
        if ($this->isBusy()) {
            posix_kill($this->workPid, \SIGKILL);
            $this->getWorkState(true);
        }
    }
1031160
public function fire()
	{
        $expiredBlacklistedTokens = $this->Blacklist->findAllExpired();
        $expiredBlacklistedTokensCount = count($expiredBlacklistedTokens);

        if ($expiredBlacklistedTokensCount > 0)
        {
            $this->Blacklist->deleteAllExpired();

            // The number of expired blacklisted tokens should now be 0
            $expiredBlacklistedTokensCountCheck = count($this->Blacklist->findAllExpired());

            if ($expiredBlacklistedTokensCountCheck === 0)
            {
                Log::info('Successfully deleted ' . $expiredBlacklistedTokensCount . ' expired blacklisted authentication tokens');
            }
            else {
                Log::warning('Something went wrong deleting expired blacklisted authentication tokens, ' . $expiredBlacklistedTokensCount . ' should have been removed, ' . $expiredBlacklistedTokensCountCheck . ' still remain.');
            }
        }

        Log::info('No blacklisted blacklisted authentication tokens needed cleaning up as none had deleted expired');
	}
1023158
public function fire()
	{
		$this->currentRoot = trim($this->getAppNamespace(), '\\');

		$this->setBootstrapNamespaces();

		$this->setAppDirectoryNamespace();

		$this->setConfigNamespaces();

		$this->setComposerNamespace();

		$this->setPhpSpecNamespace();

		$this->info('Application namespace set!');

		$this->composer->dumpAutoloads();

		$this->call('clear-compiled');
	}
1341243
public function kill($status = 0)
    {
        $this->events->dispatch(new Events\WorkerStopping($status));

        if (extension_loaded('posix')) {
            posix_kill(getmypid(), SIGKILL);
        }

        exit($status);
    }
522742
public function fire()
    {
        $this->comment('Regeneration of assets collections...');
        $directories = $this->getDirectories();
        if (empty($directories)) {
            $this->comment('no directories to scan, abort');

            return;
        }

        //dd($directories);
        $scanner = $this->getScanner();

        $scanner->setDirectoriesToScan($directories);

        $scanner->scan();
        $added = $scanner->getNewlyBuildedCollections();
        $removed = $scanner->getRemovedBuildedCollections();
        if (count($added) > 0) {
            $this->comment('added collections : '.implode(', ', $added));
        }
        if (count($removed) > 0) {
            $this->comment('removed collections : '.implode(', ', $removed));
        }
        if ((count($added) + count($removed)) > 0 && $this->option('silent') !== true) {
            $update = $this->ask('Update Assets groups with the new or removed collections ? y/n', 'y');
            $this->comment('sorry in the new release ;)');
        }
        $this->comment('done');
    }
1285291
public function fire()
    {
        $dir_public = public_path();
        $this->files->force($dir_public);

        $this->files->copy(__DIR__ . '/../../public/index.php', $this->files->combine($dir_public, 'index.php'));
        $this->files->copy(__DIR__ . '/../../public/robots.txt', $this->files->combine($dir_public, 'robots.txt'));
        $this->files->copy(__DIR__ . '/../../public/.htaccess', $this->files->combine($dir_public, '.htaccess'));

        $this->info('HTTP installed');
    }
247003
public function fire()
    {

        foreach ($this->files->files(storage_path().'/framework/views') as $file)
        {
            $this->files->delete($file);
        }

        $this->info('Views deleted from cache.');
    }
1333654
public void kill() {

        if (m_shell != null) {
            m_shell.exit();
        }
        if (m_loggingThread != null) {
            m_loggingThread.stopThread();
        }
        m_shell = null;
        m_setupBean = null;
    }
808954
public function fire()
	{
		$filter = $this->argument('filter');
		$verbose = $this->option('verbose');

		$aliasLoader = AliasLoader::getInstance();
		$first = true;

		foreach ($aliasLoader->getAliases() as $alias => $class) {

			// If a filter is given, only display aliases that start with that substring
			if ($filter && stripos($alias, $filter) !== 0)
				continue;

			// Put a blank line between each one
			if ($first)
				$first = false;
			else
				$this->line('');

			// Display the alias name
			$this->comment($alias);

			// Display the class that this alias maps to and all of its parents
			$type = 'alias  ';
			while ($class) {

				if ($verbose)
					$this->line("<info>$type ></info> $class");
				else
					$this->line("<info>-></info> $class");

				if ($this->isFacade($class))
				{
					if ($verbose)
					{
						if ($accessor = $this->getFacadeAccessor($class))
							$this->line("<info>facade  ></info> <comment>App::make('$accessor')</comment>");
						else
							$this->line("<info>facade  ></info> <comment>$class::getFacadeRoot()</comment>");
					}

					$type = 'resolve';
					$class = get_class($class::getFacadeRoot());
				}
				else
				{
					$type = 'parent ';
					$class = get_parent_class($class);
				}
			}
		}
	}
846669
public function fire()
    {
        $this->createDirectories();

        $this->exportViews();

        if (! $this->option('views')) {
            $this->info('Installed HomeController.');

            file_put_contents(
                app_path('Laravel/Http/Controllers/HomeController.php'),
                $this->compileControllerStub()
            );

            file_put_contents(
                base_path('app/routes/web.php'),
                file_get_contents(__DIR__.'/stubs/make/routes.stub'),
                FILE_APPEND
            );
        }

        $this->info('Authentication scaffolding generated successfully.');
    }
257598
public function stop($kill = false)
    {
        foreach ($this->threads as $thread) {
            $thread->stop($kill);
        }
    }
1336088
public function killChild()
	{
		if(!$this->child) {
			$this->logger->log(Psr\Log\LogLevel::DEBUG, 'No child to kill.');
			return;
		}

		$this->logger->log(Psr\Log\LogLevel::INFO, 'Killing child at {child}', array('child' => $this->child));
		if(exec('ps -o pid,state -p ' . $this->child, $output, $returnCode) && $returnCode != 1) {
			$this->logger->log(Psr\Log\LogLevel::DEBUG, 'Child {child} found, killing.', array('child' => $this->child));
			posix_kill($this->child, SIGKILL);
			$this->child = null;
		}
		else {
			$this->logger->log(Psr\Log\LogLevel::INFO, 'Child {child} not found, restarting.', array('child' => $this->child));
			$this->shutdown();
		}
	}
317996
public function fire()
    {
        // Remove the files from the cache directory
        $this->removeFiles($this->buildFileList(config('assetprocessor.cache.directory')));

        // Remove the files from the external directory
        $this->removeFiles($this->buildFileList(config('assetprocessor.cache.external')));
        
    }
1168008
public function killAllAction()
    {
        $processManager = Mage::getModel('aoe_scheduler/processManager'); /* @var $processManager Aoe_Scheduler_Model_ProcessManager */
        foreach ($processManager->getAllRunningSchedules(gethostname()) as $schedule) { /* @var $schedule Aoe_Scheduler_Model_Schedule */
            if ($schedule->isAlive() === true) {
                $schedule->kill();
                echo sprintf(
                    "%-30s %-10s %-10s: Killed\n",
                    $schedule->getJobCode(),
                    $schedule->getHost(),
                    $schedule->getPid()
                );
            }
        }
    }
1355930
public function fire()
	{
		$this->call('route:clear');

		$routes = $this->getFreshApplicationRoutes();

		if (count($routes) == 0)
		{
			return $this->error("Your application doesn't have any routes.");
		}

		foreach ($routes as $route)
		{
			$route->prepareForSerialization();
		}

		$this->files->put(
			$this->laravel->getCachedRoutesPath(), $this->buildRouteCacheFile($routes)
		);

		$this->info('Routes cached successfully!');
	}