修正 返回

This commit is contained in:
iVampireSP.com 2022-12-11 20:59:17 +08:00
parent c89cd67d0a
commit 46886fb101
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
7 changed files with 8 additions and 13 deletions

View File

@ -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']);

View File

@ -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) {

View File

@ -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) {

View File

@ -29,7 +29,7 @@ public function __construct()
*
* @return void
*/
public function handle()
public function handle(): void
{
// 删除所有大于 1 天的任务
Task::where('created_at', '<', now()->subDay())->delete();

View File

@ -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'));

View File

@ -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();

View File

@ -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))