mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Update AvatarSync, fix sync skipping recently fetched avatars by setting last_fetched_at to null before refetching
This commit is contained in:
parent
319f0ba50f
commit
a83fc798b7
1 changed files with 3 additions and 1 deletions
|
@ -212,7 +212,9 @@ class AvatarSync extends Command
|
||||||
->with('profile')
|
->with('profile')
|
||||||
->chunk(10, function($avatars) {
|
->chunk(10, function($avatars) {
|
||||||
foreach($avatars as $avatar) {
|
foreach($avatars as $avatar) {
|
||||||
RemoteAvatarFetch::dispatch($avatar->profile);
|
$avatar->last_fetched_at = null;
|
||||||
|
$avatar->save();
|
||||||
|
RemoteAvatarFetch::dispatch($avatar->profile)->onQueue('low');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue