Fix InstaGetTopMediasJob forgotten truncate table

This commit is contained in:
Jérémy Munsch 2023-04-21 16:24:28 +02:00
parent b0e95ab875
commit 99cc669a79
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -46,10 +46,6 @@ class InstaGetTopMediasJob implements ShouldQueue, ShouldBeUnique
Cache::put('top_media_job_fetch_dispatched', true);
Cache::put('top_media_job_fetch_running', true);
DB::transaction(function () {
// * 'Truncate' our list to preserve only the desired media amount.
// Dont use truncate here because it implies a commit.
InstaMedia::query()->delete();
Cache::put(
'top_media_ajax_fetch',
InstaMedia::fetchInstagramTopMediaList(false)->values()