Update Carbon usage in lib
[MAILPOET-3232]
This commit is contained in:
committed by
Veljko V
parent
a376057560
commit
e5a671900b
@@ -325,9 +325,9 @@ class SendingQueue {
|
||||
$bounceTasks = ScheduledTask::findFutureScheduledByType(Bounce::TASK_TYPE);
|
||||
if (count($bounceTasks)) {
|
||||
$bounceTask = reset($bounceTasks);
|
||||
if (Carbon::createFromTimestamp((int)current_time('timestamp'))->addHour(42)->lessThan($bounceTask->scheduledAt)) {
|
||||
if (Carbon::createFromTimestamp((int)current_time('timestamp'))->addHours(42)->lessThan($bounceTask->scheduledAt)) {
|
||||
$randomOffset = rand(-6 * 60 * 60, 6 * 60 * 60);
|
||||
$bounceTask->scheduledAt = Carbon::createFromTimestamp((int)current_time('timestamp'))->addSecond((36 * 60 * 60) + $randomOffset);
|
||||
$bounceTask->scheduledAt = Carbon::createFromTimestamp((int)current_time('timestamp'))->addSeconds((36 * 60 * 60) + $randomOffset);
|
||||
$bounceTask->save();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user