Execute the console command.

@param  \Illuminate\Contracts\Cache\Factory $cache
@param  \Laravel\Horizon\Contracts\MasterSupervisorRepository  $masters
@return void
340293
public function handle(CacheFactory $cache, MasterSupervisorRepository $masters)
    {
        if (config('horizon.fast_termination')) {
            $cache->forever(
                'horizon:terminate:wait', $this->option('wait')
            );
        }

        $masters = collect($masters->all())->filter(function ($master) {
            return Str::startsWith($master->name, MasterSupervisor::basename());
        })->all();

        foreach (Arr::pluck($masters, 'pid') as $processId) {
            $this->info("Sending TERM Signal To Process: {$processId}");

            if (! posix_kill($processId, SIGTERM)) {
                $this->error("Failed to kill process: {$processId} (".posix_strerror(posix_get_last_error()).')');
            }
        }

        $this->laravel['cache']->forever('illuminate:queue:restart', $this->currentTime());
    }
1341638
public function handle()
    {
        if ($this->isSupported($default = $this->getDefaultCache())) {
            $this->comment('Clearing the cache data...');

            $this->cache->flush();

            $this->info("Cache clearing was completed!");
        }
        else
            $this->error("Default cache system [$default] does not support tags");
    }
231321
public function handle()
    {
        // Make a storage disk for the cache location
        $cacheDisk = [
            'driver'=>'local',
            'root'=>config('cache.stores.file.path')
        ];
        \Config::set('filesystems.disks.fcache',$cacheDisk);
        $expired_file_count = 0;
        $active_file_count = 0;

        // Grab the cache files
        $files = \Storage::disk('fcache')->allFiles();

        // Loop the files and get rid of any that have expired
        foreach($files as $key=>$cachefile) {
            // Ignore this file
            if($cachefile == '.gitignore') {
                continue;
            }

            try {
                // Grab the contents of the file
                $contents = \Storage::disk('fcache')->get($cachefile);

                // Get the expiration time
                $expire = substr($contents, 0, 10);

                // See if we have expired
                if(time() >= $expire) {
                    // Delete the file
                    \Storage::disk('fcache')->delete($cachefile);
                    $expired_file_count++;
                } else {
                    $active_file_count++;
                }
            } catch(\Illuminate\Contracts\Filesystem\FileNotFoundException $e) {
                // Getting an occasional error of this type on the 'get' command above,
                // so adding a try-catch to skip the file if we do.
            }
        }

        $this->line('Total expired cache files removed: '.$expired_file_count);
        $this->line('Total active cache files remaining: '.$active_file_count);
    }
703837
public function fire()
    {
        $this->resolveTenantRoutes($this->argument('domain'));

        $this->files->delete($this->laravel->getCachedRoutesPath());

        $this->info('Tenant route cache cleared!');
    }
743226
public function fire()
    {
        if (!$this->cacheEnabled) {
            $this->info('The translation cache is disabled.');
        } else {
            $this->cacheRepository->flushAll();
            $this->info('Translation cache cleared.');
        }
    }
906505
public function master()
    {
        $request = $this->createRequestInstance(self::CAT_MASTER, null, null);

        return $this->client->send($request);
    }
338130
public function handle()
    {
        $this->repository->setSource($this->option('database'));

        $this->repository->createRepository();

        $this->info('Mapping table created successfully');
    }
52586
public function fire()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $this->output->writeln('<info>Seeding KodiCMS modules...</info>');
        $installer = new ModulesInstaller(ModulesLoader::getRegisteredModules());

        $installer->cleanOutputMessages();
        $installer->seedModules();

        foreach ($installer->getOutputMessages() as $message) {
            $this->output->writeln($message);
        }
    }
268878
public function evaluateDependency($cache): void
    {
        if ($this->reusable) {
            $hash = $this->generateReusableHash();
            if (!array_key_exists($hash, self::$_reusableData)) {
                self::$_reusableData[$hash] = $this->generateDependencyData($cache);
            }
            $this->data = self::$_reusableData[$hash];
        } else {
            $this->data = $this->generateDependencyData($cache);
        }
    }
1180347
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $repository = modules()->location($this->option('location'));

        $this->resetMigrations($repository);
    }
915925
public function index(MasterSupervisorRepository $masters,
                          SupervisorRepository $supervisors)
    {
        $masters = collect($masters->all())->keyBy('name')->sortBy('name');

        $supervisors = collect($supervisors->all())->sortBy('name')->groupBy('master');

        return $masters->each(function ($master, $name) use ($supervisors) {
            $master->supervisors = $supervisors->get($name);
        });
    }
873162
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $this->mappings->setSource($this->option('database'));

        $this->mappings->reset();

        $this->comment('Mapping repository reset successfully');
    }
67704
public function handle(SocialAppBuilder $socialApp, MasterBuilder $masterPage, AssetsBuilder $assets )
    {


        $appName = $this->argument('AppName');

        $masterPageName = $this->argument('MasterPageName');

        $masterPage->setFileNamesAndPaths($masterPageName, $appName, 'socialNavTemplate');

        if ( $this->makeLayoutsFolder() && $masterPage->makeMasterFiles() ) {

            $this->sendMasterSuccessMessage();
            

        } else {

            $this->error('Oops, something went wrong!');


        }

        $assets->setFileNamesAndPaths();

        if ( $assets->makeAssetFiles() ) {

            $this->sendAssetSuccessMessage();


        } else {

            $this->error('Oops, something went wrong!');

        }




        if ( $socialApp->makeSocialAppFiles($this->argument()) ) {

            $this->sendSuccessMessage();

            return;

        }

            $this->error('Oops, something went wrong!');



    }
1101209
public static void main(String[] args) {
    if (!parseInputArgs(args)) {
      usage();
      System.exit(EXIT_FAILED);
    }
    if (sHelp) {
      usage();
      System.exit(EXIT_SUCCEEDED);
    }

    List<String> masters = new ArrayList<>();
    for (MasterFactory factory : ServiceUtils.getMasterServiceLoader()) {
      masters.add(factory.getName());
    }

    for (String master : masters) {
      Upgrader upgrader = new Upgrader(master,
          new InstancedConfiguration(ConfigurationUtils.defaults()));
      try {
        upgrader.upgrade();
      } catch (IOException e) {
        LOG.error("Failed to upgrade the journal for {}.", master, e);
        System.exit(EXIT_FAILED);
      }
    }
  }
1067796
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        $this->resolver->setDefaultConnection($this->getDatabase());

        Model::unguarded(function () {
            $this->getSeeder()->__invoke();
        });

        $this->info('Database seeding completed successfully.');
    }
516576
protected function initConnect($master = true)
    {
        if (!empty($this->config['deploy'])) {
            // 采用分布式数据库
            if ($master) {
                if (!$this->linkWrite) {
                    $this->linkWrite = $this->multiConnect(true);
                }

                $this->mongo = $this->linkWrite;
            } else {
                if (!$this->linkRead) {
                    $this->linkRead = $this->multiConnect(false);
                }

                $this->mongo = $this->linkRead;
            }
        } elseif (!$this->mongo) {
            // 默认单数据库
            $this->mongo = $this->connect();
        }
    }
1198875
public function storeCache(array $cache)
    {
        if ($this->store === null) {
            register_shutdown_function([$this, 'saveCacheFile']);
        }

        $this->store = $cache;
    }