- api.py: uvicorn.run was hardcoding port=7777 instead of using the
port variable populated from BACKEND_PORT env var, making BACKEND_PORT
ineffective when running python api.py directly
- searxSearch: add missing 'import sys' (caused NameError when run as
standalone script) and use constructor base_url arg with env var
fallback so searxSearch(base_url=...) actually takes effect
Previously, any unhandled exception during query processing caused the
entire backend server to exit via sys.exit(1), making the frontend show
'System offline. Deploy backend first.' until the container was restarted.
Also, is_generating was never reset to False on exception, permanently
blocking all subsequent queries with 429 responses.
- Replace sys.exit(1) with a proper HTTP 500 error response
- Move is_generating = False to the finally block so it always resets
Fixes#382