mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-08 03:50:50 +08:00
chore(notice): 规范修复与安装演练收尾
This commit is contained in:
@@ -114,9 +114,9 @@ class NoticeConsumerBase extends TimerController
|
||||
->where('id', 'in', $candidates)
|
||||
->where('status', SystemNoticeTargetBase::STATUS_PENDING)
|
||||
->update([
|
||||
'status' => SystemNoticeTargetBase::STATUS_SENDING,
|
||||
'status' => SystemNoticeTargetBase::STATUS_SENDING,
|
||||
'claim_token' => $token,
|
||||
'claim_time' => time(),
|
||||
'claim_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
||||
@@ -161,8 +161,8 @@ class NoticeConsumerBase extends TimerController
|
||||
->where('claim_token', $token)
|
||||
->where('status', SystemNoticeTargetBase::STATUS_SENDING)
|
||||
->update([
|
||||
'status' => SystemNoticeTargetBase::STATUS_SUCCESS,
|
||||
'send_time' => time(),
|
||||
'status' => SystemNoticeTargetBase::STATUS_SUCCESS,
|
||||
'send_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
} catch (\Throwable $e) {
|
||||
@@ -198,10 +198,10 @@ class NoticeConsumerBase extends TimerController
|
||||
->where('claim_token', $token)
|
||||
->where('status', SystemNoticeTargetBase::STATUS_SENDING)
|
||||
->update([
|
||||
'status' => SystemNoticeTargetBase::STATUS_FAILED,
|
||||
'retry_count' => $retry_count,
|
||||
'status' => SystemNoticeTargetBase::STATUS_FAILED,
|
||||
'retry_count' => $retry_count,
|
||||
'error_message' => $error_message,
|
||||
'update_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
||||
return;
|
||||
@@ -212,11 +212,11 @@ class NoticeConsumerBase extends TimerController
|
||||
->where('claim_token', $token)
|
||||
->where('status', SystemNoticeTargetBase::STATUS_SENDING)
|
||||
->update([
|
||||
'status' => SystemNoticeTargetBase::STATUS_PENDING,
|
||||
'retry_count' => $retry_count,
|
||||
'status' => SystemNoticeTargetBase::STATUS_PENDING,
|
||||
'retry_count' => $retry_count,
|
||||
'next_retry_time' => time() + self::RETRY_BASE_SECONDS * (2 ** $retry_count),
|
||||
'error_message' => $error_message,
|
||||
'update_time' => time(),
|
||||
'error_message' => $error_message,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ class NoticeReclaimBase extends TimerController
|
||||
->where('status', SystemNoticeTargetBase::STATUS_SENDING)
|
||||
->where('claim_time', '<', time() - self::RECLAIM_TIMEOUT)
|
||||
->update([
|
||||
'status' => SystemNoticeTargetBase::STATUS_PENDING,
|
||||
'status' => SystemNoticeTargetBase::STATUS_PENDING,
|
||||
'claim_token' => '',
|
||||
'claim_time' => 0,
|
||||
'claim_time' => 0,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user