Update AvatarSync, fix sync skipping recently fetched avatars by setting last_fetched_at to null before refetching

pull/3875/head
Daniel Supernault 2022-12-01 23:17:05 -07:00
rodzic 319f0ba50f
commit a83fc798b7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -212,7 +212,9 @@ class AvatarSync extends Command
->with('profile')
->chunk(10, function($avatars) {
foreach($avatars as $avatar) {
RemoteAvatarFetch::dispatch($avatar->profile);
$avatar->last_fetched_at = null;
$avatar->save();
RemoteAvatarFetch::dispatch($avatar->profile)->onQueue('low');
}
});
}