From 2a3fd8771d106702577ddf8a25478fa16ca3aa3c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 10 Apr 2020 21:23:48 -0600 Subject: [PATCH] Update StoryGC command --- app/Console/Commands/StoryGC.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/StoryGC.php b/app/Console/Commands/StoryGC.php index 82eda89f9..685714a75 100644 --- a/app/Console/Commands/StoryGC.php +++ b/app/Console/Commands/StoryGC.php @@ -54,7 +54,7 @@ class StoryGC extends Command { $day = now()->day; - if($day !== 3) { + if($day != 3) { return; } @@ -81,12 +81,12 @@ class StoryGC extends Command protected function deleteViews() { - StoryView::where('created_at', '<', now()->subDays(2))->delete(); + StoryView::where('created_at', '<', now()->subMinutes(1441))->delete(); } protected function deleteStories() { - $stories = Story::where('expires_at', '<', now())->take(50)->get(); + $stories = Story::where('created_at', '<', now()->subMinutes(1441))->take(50)->get(); if($stories->count() == 0) { exit;