mirror of
https://github.com/LearningCircuit/local-deep-research.git
synced 2026-06-16 12:02:34 +03:00
* refactor: cleanup remaining verified dead code across 5 areas Dead templates, functions, storage ABCs, eslint duplicate, dev scripts. All verified by 40 agents (20 scanning + 20 verification). * revert: keep 3 dev scripts that have active references - regenerate_golden_master.py: called by pre-commit hook .pre-commit-hooks/check-golden-master-settings.py - restart_server.sh: documented in API testing guide, examples, and multiple README files - run_tests.py: referenced in CONTRIBUTING.md testing section Added inline comments noting the references so future cleanup attempts don't remove them without updating dependents. * revert: keep restart_server_debug.sh dev script * revert: keep debug_pytest.py and stop_server.sh dev scripts Small utility scripts that cost nothing to keep and are useful for developers debugging CI failures and managing the dev server. * docs: add do-not-remove comments to all dev scripts Each script now documents why it must be kept: - regenerate_golden_master.py: pre-commit hook dependency - restart_server.sh: documented in API guides and examples - restart_server_debug.sh: companion to restart_server.sh - run_tests.py: referenced in CONTRIBUTING.md - debug_pytest.py: developer utility for CI failure reproduction - stop_server.sh: companion to restart_server.sh
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Script to stop the LDR server.
|
|
# Do not remove — companion to restart_server.sh; handles graceful
|
|
# and forced shutdown of the dev server.
|
|
|
|
echo "Stopping LDR server..."
|
|
|
|
# Kill the main server process
|
|
if pkill -f "python -m local_deep_research.web.app" 2>/dev/null; then
|
|
echo "✓ Server stopped successfully"
|
|
|
|
# Wait a moment for the process to fully terminate
|
|
sleep 1
|
|
|
|
# Check if any processes are still running
|
|
if pgrep -f "python -m local_deep_research.web.app" > /dev/null; then
|
|
echo "Warning: Some server processes may still be running"
|
|
echo "Attempting force stop..."
|
|
pkill -9 -f "python -m local_deep_research.web.app" 2>/dev/null
|
|
sleep 1
|
|
fi
|
|
else
|
|
echo "No running LDR server found"
|
|
fi
|
|
|
|
# Also stop any orphaned Flask dev servers
|
|
pkill -f "flask run" 2>/dev/null
|
|
|
|
# Check final status
|
|
if pgrep -f "python -m local_deep_research.web.app" > /dev/null; then
|
|
echo "Error: Server processes still running:"
|
|
pgrep -af "python -m local_deep_research.web.app"
|
|
exit 1
|
|
else
|
|
echo "All server processes stopped"
|
|
exit 0
|
|
fi
|