File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ build-adapter: build
450450 #!/usr/bin/env bash
451451 set -euo pipefail
452452 echo " Building V-lang adapter..."
453- v -cc gcc -cflags " -L$( pwd) /ffi/zig/zig-out/lib -L$( pwd) /cartridges/container-mcp/ffi/zig-out/lib -Wl,--allow-multiple-definition" \
453+ v -cc gcc -cflags " -L$( pwd) /ffi/zig/zig-out/lib -L$( pwd) /cartridges/container-mcp/ffi/zig-out/lib -L $( pwd ) /cartridges/feedback-mcp/ffi/zig-out/lib - Wl,--allow-multiple-definition" \
454454 -o adapter/v/boj-server adapter/v/src/main.v
455455 echo " Built: adapter/v/boj-server ($( du -h adapter/v/boj-server | cut -f1) )"
456456
Original file line number Diff line number Diff line change @@ -315,6 +315,10 @@ mut:
315315 start_time time.Time
316316 node_id string
317317 region string
318+ hostname string
319+ rest_port string
320+ grpc_port string
321+ graphql_port string
318322 event_queue EventQueue
319323}
320324
@@ -324,6 +328,10 @@ fn BojApp.new() BojApp {
324328 start_time: time.now ()
325329 node_id: os.getenv_opt ('BOJ_NODE_ID' ) or { 'local-0' }
326330 region: os.getenv_opt ('BOJ_REGION' ) or { 'local' }
331+ hostname: os.getenv_opt ('BOJ_HOSTNAME' ) or { 'localhost' }
332+ rest_port: os.getenv_opt ('BOJ_REST_PORT' ) or { '7700' }
333+ grpc_port: os.getenv_opt ('BOJ_GRPC_PORT' ) or { '7701' }
334+ graphql_port: os.getenv_opt ('BOJ_GRAPHQL_PORT' ) or { '7702' }
327335 event_queue: EventQueue.new ()
328336 }
329337}
@@ -3130,6 +3138,16 @@ fn main() {
31303138 total := C.boj_catalogue_count ()
31313139 ready := C.boj_catalogue_count_ready ()
31323140 println ('Catalogue: ${total } cartridges registered, ${ready } ready' )
3141+
3142+ // Mount all ready cartridges so they can serve requests
3143+ mut mounted_count := usize (0 )
3144+ for i in 0 .. int (total) {
3145+ result := C.boj_catalogue_mount (usize (i))
3146+ if result == 0 {
3147+ mounted_count++
3148+ }
3149+ }
3150+ println ('Mounted: ${mounted_count }/${total } cartridges' )
31333151 println ('' )
31343152
31353153 app_ref := & app
You can’t perform that action at this time.
0 commit comments