Plugins base (#613)

* wip

* wip

* cleanup

* notification channels

* phpstan

* services

* remove server types

* refactoring

* refactoring
This commit is contained in:
Saeed Vaziry
2025-06-14 14:35:18 +02:00
committed by GitHub
parent adc0653d15
commit 131b828807
311 changed files with 3976 additions and 2660 deletions

View File

@ -18,9 +18,14 @@ public function handle(): void
ServerStatus::READY,
ServerStatus::DISCONNECTED,
])->chunk(50, function ($servers) {
$dispatchTime = now();
/** @var Server $server */
foreach ($servers as $server) {
dispatch(function () use ($server) {
dispatch(function () use ($server, $dispatchTime) {
// check connection if dispatch time is less than 5 minutes ago
if ($dispatchTime->diffInMinutes(now()) > 5) {
return;
}
$server->checkConnection();
})->onConnection('ssh');
}