diff --git a/ServerRateLimitsSyncService.php b/ServerRateLimitsSyncService.php new file mode 100644 index 0000000..a92354c --- /dev/null +++ b/ServerRateLimitsSyncService.php @@ -0,0 +1,32 @@ +servers; + + $servers->each(function (Server $server) { + try { + if ($server->bandwidth_usage >= $server->bandwidth_limit && isset($server->bandwidth_limit)) { + $this->service->setRateLimit($server, 1); + } else { + $this->service->setRateLimit($server); + } + } catch (ProxmoxConnectionException $e) { + // do nothing + } + }); + } +}