auto(0129): agents_dashboard — secret_store_cpp_infra + CMakeLists register #4

Open
dataforge wants to merge 615 commits from auto/0129 into master
2 changed files with 44 additions and 3 deletions
Showing only changes of commit adfd5f63bb - Show all commits
+4 -3
View File
@@ -99,7 +99,8 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/apps/chart_demo/CMakeLists.txt)
add_subdirectory(apps/chart_demo)
endif()
# --- Registry Dashboard (lives in apps/ per project convention) ---
if(EXISTS ${CMAKE_SOURCE_DIR}/../apps/registry_dashboard/CMakeLists.txt)
add_subdirectory(${CMAKE_SOURCE_DIR}/../apps/registry_dashboard ${CMAKE_BINARY_DIR}/apps/registry_dashboard)
# --- Registry Dashboard (lives in projects/fn_monitoring/apps/) ---
set(_DASH_DIR ${CMAKE_SOURCE_DIR}/../projects/fn_monitoring/apps/registry_dashboard)
if(EXISTS ${_DASH_DIR}/CMakeLists.txt)
add_subdirectory(${_DASH_DIR} ${CMAKE_BINARY_DIR}/apps/registry_dashboard)
endif()
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# Start sqlite_api in the background. Logs to sqlite_api.log.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REGISTRY_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
LOG="$SCRIPT_DIR/sqlite_api.log"
PID_FILE="$SCRIPT_DIR/sqlite_api.pid"
# Kill previous instance if running
if [ -f "$PID_FILE" ]; then
old_pid=$(cat "$PID_FILE")
if kill -0 "$old_pid" 2>/dev/null; then
echo "Stopping previous instance (PID $old_pid)"
kill "$old_pid"
sleep 0.5
fi
rm -f "$PID_FILE"
fi
export FN_REGISTRY_ROOT="$REGISTRY_ROOT"
cd "$REGISTRY_ROOT"
CGO_ENABLED=1 go run -tags fts5 ./projects/fn_monitoring/apps/sqlite_api/ "$@" \
>"$LOG" 2>&1 &
echo $! > "$PID_FILE"
echo "sqlite_api started (PID $!, log: $LOG)"
sleep 0.5
if curl -sf http://127.0.0.1:8484/health >/dev/null 2>&1; then
echo "Health check OK"
else
echo "Waiting for startup..."
sleep 1.5
if curl -sf http://127.0.0.1:8484/health >/dev/null 2>&1; then
echo "Health check OK"
else
echo "Warning: health check failed — check $LOG"
fi
fi