REBELinBLUE\Deployer\Console\Commands\CheckUrl::handle PHP Method

handle() public method

Execute the console command.
public handle ( ) : boolean
return boolean
    public function handle()
    {
        $period = [];
        $minute = intval(date('i'));
        if ($minute === 0) {
            $period = [60, 30, 10, 5];
        } else {
            if ($minute % 30 === 0) {
                $period = [30, 10, 5];
            } elseif ($minute % 10 === 0) {
                $period = [10, 5];
            } elseif ($minute % 5 === 0) {
                $period = [5];
            }
        }
        if (!empty($period)) {
            CheckUrlModel::whereIn('period', $period)->chunk(self::URLS_TO_CHECK, function ($urls) {
                $this->dispatch(new RequestProjectCheckUrl($urls));
            });
        }
        return true;
    }
CheckUrl