mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 任务提醒缩短邮件通知时间区间
This commit is contained in:
parent
97fb0ba95a
commit
fe8cf38a7f
@ -25,8 +25,8 @@ class OverdueRemindEmailTask extends AbstractTask
|
|||||||
$taskLists2 = [];
|
$taskLists2 = [];
|
||||||
if ($hours > 0) {
|
if ($hours > 0) {
|
||||||
$taskLists1 = ProjectTask::whereNull('complete_at')
|
$taskLists1 = ProjectTask::whereNull('complete_at')
|
||||||
->where('end_at', '>=', Carbon::now()->addMinutes($hours * 60 - 30)->rawFormat('Y-m-d H:i:s'))
|
->where('end_at', '>=', Carbon::now()->addMinutes($hours * 60 - 3)->rawFormat('Y-m-d H:i:s'))
|
||||||
->where('end_at', '<=', Carbon::now()->addMinutes($hours * 60 + 30)->rawFormat('Y-m-d H:i:s'))
|
->where('end_at', '<=', Carbon::now()->addMinutes($hours * 60 + 3)->rawFormat('Y-m-d H:i:s'))
|
||||||
->whereNull('archived_at')
|
->whereNull('archived_at')
|
||||||
->take(100)
|
->take(100)
|
||||||
->get()
|
->get()
|
||||||
@ -34,8 +34,8 @@ class OverdueRemindEmailTask extends AbstractTask
|
|||||||
}
|
}
|
||||||
if ($hours2 > 0) {
|
if ($hours2 > 0) {
|
||||||
$taskLists2 = ProjectTask::whereNull('complete_at')
|
$taskLists2 = ProjectTask::whereNull('complete_at')
|
||||||
->where('end_at', '>=', Carbon::now()->subMinutes($hours2 * 60 - 30)->rawFormat('Y-m-d H:i:s'))
|
->where('end_at', '>=', Carbon::now()->subMinutes($hours2 * 60 - 3)->rawFormat('Y-m-d H:i:s'))
|
||||||
->where('end_at', '<=', Carbon::now()->subMinutes($hours * 60 + 30)->rawFormat('Y-m-d H:i:s'))
|
->where('end_at', '<=', Carbon::now()->subMinutes($hours * 60 + 3)->rawFormat('Y-m-d H:i:s'))
|
||||||
->whereNull('archived_at')
|
->whereNull('archived_at')
|
||||||
->take(100)
|
->take(100)
|
||||||
->get()
|
->get()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user