Skip to content

Commit ec9ea33

Browse files
committed
Backfill users
1 parent 9b75f8d commit ec9ea33

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/Console/Commands/BackfillIdenticons.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ class BackfillIdenticons extends Command
2727
*/
2828
public function handle()
2929
{
30+
$i = 0;
31+
3032
User::whereNotNull('github_id')
31-
->chunk(100, function ($users) {
33+
->chunk(100, function ($users) use (&$i) {
3234
foreach ($users as $user) {
3335
UpdateUserIdenticonStatus::dispatch($user);
36+
$i++;
3437
}
3538

36-
sleep(2);
39+
$this->info('Dispatched job for '.$i.' users');
3740
});
41+
42+
$this->info('Dispatched job for a total of '.$i.' users');
3843
}
3944
}

app/Social/GithubUserApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ public function hasIdenticon(int|string $id): bool
3030

3131
[$width, $height] = $info;
3232

33-
return ! ($width === 420 && $height === 420);
33+
return $width === 420 && $height === 420;
3434
}
3535
}

0 commit comments

Comments
 (0)