MCPcopy Index your code
hub / github.com/deepnote/deepnote / startExecutionEngine

Function startExecutionEngine

packages/cli/src/commands/run.ts:979–1007  ·  view source on GitHub ↗
(engine: ExecutionEngine, isMachineOutput: boolean)

Source from the content-addressed store, hash-verified

977}
978
979async function startExecutionEngine(engine: ExecutionEngine, isMachineOutput: boolean): Promise<void> {
980 if (!isMachineOutput) {
981 log(getChalk().dim('Starting deepnote-toolkit server...'))
982 }
983
984 try {
985 await engine.start()
986 } catch (error) {
987 const message = error instanceof Error ? error.message : String(error)
988
989 // Attempt to clean up any partially-initialized resource
990 try {
991 await engine.stop()
992 } catch (stopError) {
993 const stopMessage = stopError instanceof Error ? stopError.message : String(stopError)
994 if (!isMachineOutput) {
995 logError(getChalk().dim(`Note: cleanup also failed: ${stopMessage}`))
996 }
997 }
998
999 throw new Error(
1000 `Failed to start server: ${message}\n\nMake sure deepnote-toolkit is installed:\n pip install deepnote-toolkit[server]`
1001 )
1002 }
1003
1004 if (!isMachineOutput) {
1005 log(getChalk().dim('Server ready. Executing blocks...\n'))
1006 }
1007}
1008
1009async function startMetricsMonitoring(
1010 engine: ExecutionEngine,

Callers 1

runDeepnoteProjectFunction · 0.85

Calls 4

logFunction · 0.90
getChalkFunction · 0.90
startMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected