修正 返回
This commit is contained in:
parent
c89cd67d0a
commit
46886fb101
@ -21,7 +21,7 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
// closed replied after 1 day
|
||||
WorkOrder::where('status', 'replied')->where('updated_at', '<=', now()->subDay())->update(['status' => 'closed']);
|
||||
|
@ -26,7 +26,7 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
Balance::where('paid_at', null)->chunk(100, function ($balances) {
|
||||
foreach ($balances as $balance) {
|
||||
|
@ -30,7 +30,7 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
// 删除所有模块中不存在的主机
|
||||
Host::with('module')->where('created_at', '<', now()->subHour())->chunk(100, function ($hosts) {
|
||||
|
@ -29,7 +29,7 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
// 删除所有大于 1 天的任务
|
||||
Task::where('created_at', '<', now()->subDay())->delete();
|
||||
|
@ -29,11 +29,9 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
//
|
||||
|
||||
// 查找暂停时间超过3天以上的 host
|
||||
// 查找暂停时间超过 3 天的 host
|
||||
Host::where('status', 'suspended')->where('suspended_at', '<', now()->subDays(3))->chunk(100, function ($hosts) {
|
||||
foreach ($hosts as $host) {
|
||||
dispatch(new \App\Jobs\Module\Host($host, 'delete'));
|
||||
|
@ -31,7 +31,7 @@ public function __construct($minute)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
// chunk hosts and load user
|
||||
$host = new Host();
|
||||
|
@ -22,11 +22,8 @@ public function __construct()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
//
|
||||
|
||||
|
||||
Module::chunk(100, function ($modules) {
|
||||
foreach ($modules as $module) {
|
||||
(new ModuleEarnings($module))
|
||||
|
Loading…
Reference in New Issue
Block a user