改进 取消判断
This commit is contained in:
parent
cc93bb814c
commit
fd4b9b8d72
@ -41,6 +41,7 @@ public function handle(): void
|
||||
$host->where('day_at', $now->day)
|
||||
->where('hour_at', $now->hour)
|
||||
->where('trial_ends_at', '<', $now)
|
||||
->whereNot('billing_cycle', 'hourly')
|
||||
->chunk(500, function ($hosts) {
|
||||
$hosts->each(function ($host) {
|
||||
/* @var Host $host */
|
||||
@ -53,6 +54,7 @@ public function handle(): void
|
||||
|
||||
// 查找到期的主机
|
||||
$host->where('expired_at', '<', $now)
|
||||
->whereNot('billing_cycle', 'hourly')
|
||||
->chunk(500, function ($hosts) {
|
||||
$hosts->each(function ($host) {
|
||||
/* @var Host $host */
|
||||
@ -63,6 +65,10 @@ public function handle(): void
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if ($this->host->isHourly()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->host->isNextMonthCancel()) {
|
||||
$this->host->safeDelete();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user