Fix for Hourly Crons (#1127)

* Fix for Hourly Cron

We should be using whereTime instead of whereDate

https://laravel.com/docs/8.x/queries#additional-where-clauses
`The whereDate method may be used to compare a column's value against a date`

* Fix for RemoveExpiredBids

I used where to do check 'cause people may set 48 hours to remove a bid, thus neither whereDate nor whereTime will give a correct results.

* Fix for DeletePireps

I used where to do check 'cause people may set 48 hours to delete cancelled or rejected pireps, thus neither whereDate nor whereTime will give a correct results.
This commit is contained in:
B.Fatih KOZ
2021-04-10 02:15:22 +03:00
committed by GitHub
parent 344edde0fb
commit 6c3992e781
3 changed files with 3 additions and 3 deletions

View File

@@ -26,6 +26,6 @@ class RemoveExpiredBids extends Listener
}
$date = Carbon::now()->subHours(setting('bids.expire_time'));
Bid::whereDate('created_at', '<', $date)->delete();
Bid::where('created_at', '<', $date)->delete();
}
}