mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 06:15:13 +00:00
remove Logs::
This commit is contained in:
1 parent
9321cc3de8
commit
98d057a2ac
4 files changed
+7
-7
No files matched your search
@@ -48,13 +48,14 @@ class DockerCleanupJob implements ShouldQueue
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
ray($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private function get_disk_usage(Server $server, string $docker_root_filesystem) {
|
||||
|
||||
private function get_disk_usage(Server $server, string $docker_root_filesystem)
|
||||
{
|
||||
$disk_usage = json_decode(instant_remote_process(['df -hP | awk \'BEGIN {printf"{\"disks\":["}{if($1=="Filesystem")next;if(a)printf",";printf"{\"mount\":\""$6"\",\"size\":\""$2"\",\"used\":\""$3"\",\"avail\":\""$4"\",\"use%\":\""$5"\"}";a++;}END{print"]}";}\''], $server), true);
|
||||
$mount_point = collect(data_get($disk_usage, 'disks'))->where('mount', $docker_root_filesystem)->first();
|
||||
return Str::of(data_get($mount_point, 'use%'))->trim()->replace('%', '')->value();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user