重新调整时间
This commit is contained in:
parent
c27ed95ace
commit
2a76cd5486
@ -35,7 +35,7 @@ protected function schedule(Schedule $schedule)
|
||||
|
||||
$schedule->job(new DeleteHost())->hourly();
|
||||
|
||||
$schedule->job(new CheckHostIfExistsOnModule())->hourly()->withoutOverlapping()->onOneServer();
|
||||
$schedule->job(new CheckHostIfExistsOnModule())->everyThirtyMinutes()->withoutOverlapping()->onOneServer();
|
||||
|
||||
$schedule->job(new CheckAndChargeBalance())->everyFiveMinutes()->onOneServer()->withoutOverlapping();
|
||||
}
|
||||
|
@ -32,8 +32,10 @@ public function __construct()
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// now 添加1.5小时
|
||||
|
||||
//
|
||||
Host::with('module')->chunk(100, function ($hosts) {
|
||||
Host::with('module')->where('created_at', '<', now()->subHour())->chunk(100, function ($hosts) {
|
||||
foreach ($hosts as $host) {
|
||||
$http = Http::remote($host->module->api_token, $host->module->url);
|
||||
$response = $http->get('hosts/' . $host->id);
|
||||
|
Loading…
Reference in New Issue
Block a user