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

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed
    public function handle()
    {
        $last_mirrored_since = Carbon::now()->subMinutes(self::UPDATE_FREQUENCY_MINUTES);
        $todo = self::UPDATES_TO_QUEUE;
        Project::where('last_mirrored', '<', $last_mirrored_since)->chunk($todo, function ($projects) {
            foreach ($projects as $project) {
                $this->dispatch(new UpdateGitMirror($project));
            }
        });
    }
UpdateGitMirrors