fix(boot): Implement boot.lock to prevent duplicate daemon race conditions
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
@@ -171,12 +171,14 @@ case "$COMMAND" in
|
||||
export SKILLS_DIR="${SCRIPT_DIR}/skills"
|
||||
[ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
|
||||
# 1. Warm the cache in the foreground (Blocking)
|
||||
echo -e "--- Pre-compiling Neural Dependencies ---"
|
||||
echo -e "touch "/boot.lock"
|
||||
echo -e "--- Pre-compiling Neural Dependencies ---""
|
||||
sbcl --non-interactive --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' \
|
||||
--eval "(push (truename \"\") asdf:*central-registry*)" \
|
||||
--eval "(ql:quickload '(:opencortex :opencortex/tui :croatoan))"
|
||||
|
||||
# 2. Now launch the actual daemon
|
||||
rm -f "/boot.lock"
|
||||
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)'
|
||||
;;
|
||||
|
||||
@@ -195,12 +197,14 @@ case "$COMMAND" in
|
||||
export SKILLS_DIR="${SCRIPT_DIR}/skills"
|
||||
[ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
|
||||
# 1. Warm the cache in the foreground (Blocking)
|
||||
echo -e "--- Pre-compiling Neural Dependencies ---"
|
||||
echo -e "touch "/boot.lock"
|
||||
echo -e "--- Pre-compiling Neural Dependencies ---""
|
||||
sbcl --non-interactive --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' \
|
||||
--eval "(push (truename \"\") asdf:*central-registry*)" \
|
||||
--eval "(ql:quickload '(:opencortex :opencortex/tui :croatoan))"
|
||||
|
||||
# 2. Now launch the actual daemon
|
||||
rm -f "/boot.lock"
|
||||
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)'
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user