Skip to content

Commit a854230

Browse files
committed
undo some unrelated changes
1 parent 0899833 commit a854230

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

apps/webapp/app/routes/admin.api.v1.snapshot.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,6 @@ function formatDate(date: Date) {
2424
.padStart(2, "0")}_${milliseconds.toString().padStart(3, "0")}`;
2525
}
2626

27-
// Force consistent garbage collection before taking heap snapshot
28-
async function forceConsistentGC(rounds = 5): Promise<void> {
29-
if (typeof global.gc !== "function") {
30-
console.warn("⚠️ global.gc not available - heap snapshots may be inconsistent");
31-
return;
32-
}
33-
34-
// Force multiple GC rounds to ensure consistent state
35-
for (let i = 0; i < rounds; i++) {
36-
global.gc(); // Major GC
37-
if (i < rounds - 1) {
38-
await new Promise((resolve) => setTimeout(resolve, 50));
39-
}
40-
}
41-
42-
// Final wait for any pending cleanup
43-
await new Promise((resolve) => setTimeout(resolve, 200));
44-
}
45-
4627
export async function loader({ request }: DataFunctionArgs) {
4728
const authenticationResult = await authenticateApiRequestWithPersonalAccessToken(request);
4829

@@ -60,9 +41,6 @@ export async function loader({ request }: DataFunctionArgs) {
6041
throw new Response("You must be an admin to perform this action", { status: 403 });
6142
}
6243

63-
// Force consistent GC state before taking snapshot
64-
await forceConsistentGC();
65-
6644
const tempDir = os.tmpdir();
6745
const filepath = path.join(
6846
tempDir,

0 commit comments

Comments
 (0)