This commit is contained in:
14
Makefile
14
Makefile
@@ -11,7 +11,7 @@ AUTHOR_PID := /home/zaine/logs/authoring-server.pid
|
|||||||
AUTHOR_LOG := /home/zaine/logs/authoring-server.log
|
AUTHOR_LOG := /home/zaine/logs/authoring-server.log
|
||||||
AUTHOR_PAGES_CHECK := /tmp/authoring-server-pages.json
|
AUTHOR_PAGES_CHECK := /tmp/authoring-server-pages.json
|
||||||
|
|
||||||
all: set-perms clean-output build search clean-venv author-restart
|
all: set-perms clean-output build search author-restart
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo "Building project..."
|
@echo "Building project..."
|
||||||
@@ -70,19 +70,13 @@ author-stop:
|
|||||||
author-restart: $(VENV) author-stop
|
author-restart: $(VENV) author-stop
|
||||||
@echo "Starting authoring UI on port $(AUTHOR_PORT)..."
|
@echo "Starting authoring UI on port $(AUTHOR_PORT)..."
|
||||||
@mkdir -p /home/zaine/logs
|
@mkdir -p /home/zaine/logs
|
||||||
@if command -v start-stop-daemon >/dev/null 2>&1; then \
|
@cd "$(CURDIR)" && nohup "$(CURDIR)/$(PY)" -u authoring_server.py > "$(AUTHOR_LOG)" 2>&1 & echo $$! > "$(AUTHOR_PID)"
|
||||||
start-stop-daemon --start --background --make-pidfile --pidfile "$(AUTHOR_PID)" \
|
|
||||||
--chdir "$(CURDIR)" --startas "$(CURDIR)/$(PY)" -- \
|
|
||||||
authoring_server.py > "$(AUTHOR_LOG)" 2>&1; \
|
|
||||||
else \
|
|
||||||
cd "$(CURDIR)" && { nohup "$(CURDIR)/$(PY)" authoring_server.py > "$(AUTHOR_LOG)" 2>&1 & echo $$! > "$(AUTHOR_PID)"; }; \
|
|
||||||
fi
|
|
||||||
@echo "Waiting for authoring UI and page list to respond..."
|
@echo "Waiting for authoring UI and page list to respond..."
|
||||||
@for i in 1 2 3 4 5 6 7 8 9 10; do \
|
@for i in 1 2 3 4 5 6 7 8 9 10; do \
|
||||||
PID=$$(cat "$(AUTHOR_PID)"); \
|
PID=$$(cat "$(AUTHOR_PID)"); \
|
||||||
if ! kill -0 $$PID 2>/dev/null; then \
|
if ! kill -0 $$PID 2>/dev/null; then \
|
||||||
echo "Authoring UI process exited before becoming healthy. Last logs:"; \
|
echo "Authoring UI process exited before becoming healthy. Last logs:"; \
|
||||||
tail -n 40 "$(AUTHOR_LOG)" || true; \
|
tail -n 80 "$(AUTHOR_LOG)" || true; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
if curl -fsS "$(AUTHOR_URL)/api/pages" -o "$(AUTHOR_PAGES_CHECK)" && $(PY) -c 'import json,sys; data=json.load(sys.stdin); sys.exit(0 if isinstance(data, list) and data else 1)' < "$(AUTHOR_PAGES_CHECK)"; then \
|
if curl -fsS "$(AUTHOR_URL)/api/pages" -o "$(AUTHOR_PAGES_CHECK)" && $(PY) -c 'import json,sys; data=json.load(sys.stdin); sys.exit(0 if isinstance(data, list) and data else 1)' < "$(AUTHOR_PAGES_CHECK)"; then \
|
||||||
@@ -92,7 +86,7 @@ author-restart: $(VENV) author-stop
|
|||||||
sleep 1; \
|
sleep 1; \
|
||||||
done; \
|
done; \
|
||||||
echo "Authoring UI failed to start. Last logs:"; \
|
echo "Authoring UI failed to start. Last logs:"; \
|
||||||
tail -n 40 "$(AUTHOR_LOG)" || true; \
|
tail -n 80 "$(AUTHOR_LOG)" || true; \
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
author-status:
|
author-status:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
||||||
|
|
||||||
* Posts:
|
* Posts:
|
||||||
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">07-05-2026 15:31</span>@@
|
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">07-05-2026 15:44</span>@@
|
||||||
- [[file:posts-list.sync-conflict-20260417-233432-VT6366A.org][Posts List]] @@html:<span class="post-date">14-04-2026 16:36</span>@@
|
- [[file:posts-list.sync-conflict-20260417-233432-VT6366A.org][Posts List]] @@html:<span class="post-date">14-04-2026 16:36</span>@@
|
||||||
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
- [[file:tags/notes.org][Tag: notes]]
|
- [[file:tags/notes.org][Tag: notes]]
|
||||||
- [[file:tags/review.org][Tag: review]]
|
- [[file:tags/review.org][Tag: review]]
|
||||||
- [[file:tags/website.org][Tag: website]]
|
- [[file:tags/website.org][Tag: website]]
|
||||||
- [[file:tags/life.org][Tag: life]]
|
|
||||||
- [[file:tags/update.org][Tag: update]]
|
- [[file:tags/update.org][Tag: update]]
|
||||||
- [[file:tags/insights.org][Tag: insights]]
|
- [[file:tags/life.org][Tag: life]]
|
||||||
- [[file:tags/emacs.org][Tag: emacs]]
|
|
||||||
- [[file:tags/education.org][Tag: education]]
|
- [[file:tags/education.org][Tag: education]]
|
||||||
|
- [[file:tags/insights.org][Tag: insights]]
|
||||||
- [[file:tags/reading.org][Tag: reading]]
|
- [[file:tags/reading.org][Tag: reading]]
|
||||||
|
- [[file:tags/emacs.org][Tag: emacs]]
|
||||||
- [[file:tags/maths.org][Tag: maths]]
|
- [[file:tags/maths.org][Tag: maths]]
|
||||||
- home
|
- home
|
||||||
- [[file:home/countdown.org][Countdown]]
|
- [[file:home/countdown.org][Countdown]]
|
||||||
|
|||||||
Reference in New Issue
Block a user