|
@@ -13,6 +13,7 @@ import { Flag } from "@/flag/flag"
|
|
|
import { setTimeout as sleep } from "node:timers/promises"
|
|
import { setTimeout as sleep } from "node:timers/promises"
|
|
|
import { writeHeapSnapshot } from "node:v8"
|
|
import { writeHeapSnapshot } from "node:v8"
|
|
|
import { WorkspaceID } from "@/control-plane/schema"
|
|
import { WorkspaceID } from "@/control-plane/schema"
|
|
|
|
|
+import { Heap } from "@/cli/heap"
|
|
|
|
|
|
|
|
await Log.init({
|
|
await Log.init({
|
|
|
print: process.argv.includes("--print-logs"),
|
|
print: process.argv.includes("--print-logs"),
|
|
@@ -23,6 +24,8 @@ await Log.init({
|
|
|
})(),
|
|
})(),
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+Heap.start()
|
|
|
|
|
+
|
|
|
process.on("unhandledRejection", (e) => {
|
|
process.on("unhandledRejection", (e) => {
|
|
|
Log.Default.error("rejection", {
|
|
Log.Default.error("rejection", {
|
|
|
e: e instanceof Error ? e.message : e,
|
|
e: e instanceof Error ? e.message : e,
|