1.0.12
This commit is contained in:
1 parent
a3cc26d958
commit
86a06d9de0
32 files changed
+799
-522
No files matched your search
@@ -3,6 +3,9 @@ import { getDiskUsage } from '$lib/server/docker';
|
||||
import { authorize } from '$lib/server/authorize';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
// Skip disk usage collection (Synology NAS performance fix)
|
||||
const SKIP_DF_COLLECTION = process.env.SKIP_DF_COLLECTION === 'true' || process.env.SKIP_DF_COLLECTION === '1';
|
||||
|
||||
const DISK_USAGE_TIMEOUT = 15000; // 15 second timeout
|
||||
|
||||
export const GET: RequestHandler = async ({ url, cookies }) => {
|
||||
@@ -23,6 +26,11 @@ export const GET: RequestHandler = async ({ url, cookies }) => {
|
||||
return json({ error: 'Access denied to this environment' }, { status: 403 });
|
||||
}
|
||||
|
||||
// Skip disk usage when disabled (Synology NAS performance fix)
|
||||
if (SKIP_DF_COLLECTION) {
|
||||
return json({ diskUsage: null });
|
||||
}
|
||||
|
||||
try {
|
||||
// Fetch disk usage with timeout
|
||||
const diskUsagePromise = getDiskUsage(envId);
|
||||
|
||||
Reference in new issue
Block a user