Skip to content

Commit 90caefd

Browse files
authored
fix backfill (#1361)
1 parent 9b75f8d commit 90caefd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

app/Console/Commands/BackfillIdenticons.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ 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+
37+
$i++;
3438
}
3539

36-
sleep(2);
40+
$this->info('Dispatched job for '.$i.' users');
3741
});
42+
43+
$this->info('Dispatched job for a total of '.$i.' users');
3844
}
3945
}

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)