2022-08-12 07:56:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
2022-09-13 11:32:58 +00:00
|
|
|
use App\Console\Commands\BanUser;
|
2022-09-16 11:56:58 +00:00
|
|
|
use App\Console\Commands\CalcModule;
|
2022-10-29 06:18:22 +00:00
|
|
|
use App\Console\Commands\Cluster;
|
2022-10-21 04:24:31 +00:00
|
|
|
use App\Console\Commands\Count;
|
2022-09-28 05:13:24 +00:00
|
|
|
use App\Console\Commands\GetUser;
|
2022-10-02 13:26:59 +00:00
|
|
|
use App\Console\Commands\ReduceBalance;
|
2022-10-29 04:26:34 +00:00
|
|
|
use App\Console\Commands\Status;
|
2022-09-13 11:32:58 +00:00
|
|
|
use App\Console\Commands\SuspendUserAllHosts;
|
2022-09-13 11:43:31 +00:00
|
|
|
use App\Console\Commands\UnbanUser;
|
2022-09-19 13:03:55 +00:00
|
|
|
use App\Console\Commands\UserAddBalance;
|
2022-09-21 05:35:09 +00:00
|
|
|
use App\Jobs\AutoCloseWorkOrder;
|
2022-10-29 03:44:52 +00:00
|
|
|
use App\Jobs\CalcModule as JobsCalcModule;
|
2022-09-18 06:28:29 +00:00
|
|
|
use App\Jobs\CheckAndChargeBalance;
|
2022-09-08 16:12:02 +00:00
|
|
|
use App\Jobs\HostCost;
|
2022-09-03 05:22:40 +00:00
|
|
|
use App\Jobs\ClearTasks;
|
2022-09-03 06:01:51 +00:00
|
|
|
use App\Jobs\DeleteHost;
|
2022-08-19 09:51:52 +00:00
|
|
|
use App\Jobs\Remote;
|
2022-08-12 07:56:56 +00:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
2022-09-08 16:12:02 +00:00
|
|
|
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
2022-08-12 07:56:56 +00:00
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
{
|
2022-09-08 16:12:02 +00:00
|
|
|
/**
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $commands = [
|
|
|
|
//
|
2022-09-13 11:32:58 +00:00
|
|
|
BanUser::class,
|
2022-09-13 11:43:31 +00:00
|
|
|
UnbanUser::class,
|
2022-09-16 11:56:58 +00:00
|
|
|
SuspendUserAllHosts::class,
|
|
|
|
CalcModule::class,
|
2022-09-19 13:03:55 +00:00
|
|
|
UserAddBalance::class,
|
2022-09-28 05:13:24 +00:00
|
|
|
GetUser::class,
|
2022-10-02 13:26:59 +00:00
|
|
|
ReduceBalance::class,
|
2022-10-21 04:24:31 +00:00
|
|
|
Count::class,
|
2022-10-29 04:26:34 +00:00
|
|
|
Status::class,
|
2022-10-29 06:18:22 +00:00
|
|
|
Cluster\Init::class,
|
|
|
|
Cluster\Worker::class,
|
|
|
|
Cluster\Sync::class,
|
2022-10-03 05:05:39 +00:00
|
|
|
Commands\System\Down::class,
|
|
|
|
Commands\System\Up::class,
|
2022-09-08 16:12:02 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 07:56:56 +00:00
|
|
|
/**
|
|
|
|
* Define the application's command schedule.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
{
|
2022-09-08 16:12:02 +00:00
|
|
|
//
|
2022-08-13 08:37:17 +00:00
|
|
|
|
|
|
|
// dispatch HostCost job
|
2022-09-10 03:20:44 +00:00
|
|
|
$schedule->job(new HostCost())->everyFiveMinutes();
|
2022-08-30 09:20:45 +00:00
|
|
|
// $schedule->job(new UserSave())->everyTenMinutes();
|
2022-09-07 06:43:28 +00:00
|
|
|
$schedule->job(new Remote\FetchModule())->withoutOverlapping()->everyMinute();
|
2022-09-06 15:38:56 +00:00
|
|
|
// $schedule->job(new Remote\PushHost())->everyMinute()->onOneServer();
|
2022-08-19 09:51:52 +00:00
|
|
|
$schedule->job(new Remote\PushWorkOrder())->everyMinute()->onOneServer();
|
2022-08-13 08:37:17 +00:00
|
|
|
|
2022-09-03 05:22:40 +00:00
|
|
|
$schedule->job(new ClearTasks())->weekly();
|
|
|
|
|
2022-09-03 06:01:51 +00:00
|
|
|
$schedule->job(new DeleteHost())->hourly();
|
2022-09-18 06:28:29 +00:00
|
|
|
|
2022-10-01 04:49:03 +00:00
|
|
|
$schedule->job(new CheckAndChargeBalance())->everyThirtyMinutes();
|
2022-09-21 05:35:09 +00:00
|
|
|
|
|
|
|
$schedule->job(new AutoCloseWorkOrder())->everyFiveMinutes();
|
2022-10-29 03:44:52 +00:00
|
|
|
|
|
|
|
$schedule->job(new JobsCalcModule())->everyFiveMinutes();
|
2022-08-12 07:56:56 +00:00
|
|
|
}
|
|
|
|
}
|