mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-23 22:15:49 +00:00
chore(pockethost): move long launch warning to docker spawner
This commit is contained in:
parent
80b94c5985
commit
a6e6f43fae
@ -313,11 +313,6 @@ export const instanceService = mkSingleton(async (config: InstanceServiceConfig)
|
||||
})
|
||||
}
|
||||
const api = await instanceApis[instance.id]!
|
||||
const end = now()
|
||||
const duration = end - start
|
||||
if (duration > 200) {
|
||||
warn(`Container ${instance.id} launch took ${duration}ms`)
|
||||
}
|
||||
|
||||
const endRequest = api.startRequest()
|
||||
res.on('close', endRequest)
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
mkInstanceDataPath,
|
||||
mkInternalUrl,
|
||||
mkSingleton,
|
||||
PH_CONTAINER_LAUNCH_WARN_MS,
|
||||
PH_MAX_CONCURRENT_DOCKER_LAUNCHES,
|
||||
} from '@'
|
||||
import { map } from '@s-libs/micro-dash'
|
||||
@ -212,6 +213,9 @@ export const createPocketbaseService = async (config: PocketbaseServiceConfig) =
|
||||
|
||||
info(`[${instanceId}] Docker container started at ${new Date(containerReadyTime).toISOString()}`)
|
||||
info(`[${instanceId}] Container startup time: ${startupDuration}ms (${(startupDuration / 1000).toFixed(2)}s)`)
|
||||
if (startupDuration > PH_CONTAINER_LAUNCH_WARN_MS()) {
|
||||
warn(`Container ${instanceId} launch took ${startupDuration}ms`)
|
||||
}
|
||||
|
||||
dbg(`Got started container`, container)
|
||||
started = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user