diff --git a/app/Console/Commands/BackfillIdenticons.php b/app/Console/Commands/BackfillIdenticons.php index ed7709f65..386ee29da 100644 --- a/app/Console/Commands/BackfillIdenticons.php +++ b/app/Console/Commands/BackfillIdenticons.php @@ -27,13 +27,19 @@ class BackfillIdenticons extends Command */ public function handle() { + $i = 0; + User::whereNotNull('github_id') - ->chunk(100, function ($users) { + ->chunk(100, function ($users) use (&$i) { foreach ($users as $user) { UpdateUserIdenticonStatus::dispatch($user); + + $i++; } - sleep(2); + $this->info('Dispatched job for '.$i.' users'); }); + + $this->info('Dispatched job for a total of '.$i.' users'); } } diff --git a/app/Social/GithubUserApi.php b/app/Social/GithubUserApi.php index 21cf9ee0e..66aec97a6 100644 --- a/app/Social/GithubUserApi.php +++ b/app/Social/GithubUserApi.php @@ -30,6 +30,6 @@ public function hasIdenticon(int|string $id): bool [$width, $height] = $info; - return ! ($width === 420 && $height === 420); + return $width === 420 && $height === 420; } }