From a83fc798b7651a2e63b2a323bbe2a71401001b45 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 1 Dec 2022 23:17:05 -0700 Subject: [PATCH] Update AvatarSync, fix sync skipping recently fetched avatars by setting last_fetched_at to null before refetching --- app/Console/Commands/AvatarSync.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/AvatarSync.php b/app/Console/Commands/AvatarSync.php index 57d984747..e936b722c 100644 --- a/app/Console/Commands/AvatarSync.php +++ b/app/Console/Commands/AvatarSync.php @@ -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'); } }); }