diff --git a/.gemini/last_action.txt b/.gemini/last_action.txt new file mode 100644 index 0000000..1636642 --- /dev/null +++ b/.gemini/last_action.txt @@ -0,0 +1,12 @@ +# Fixed the `AttributeError` at `/flower/`. + +Plan: +- Add `REVPROXY = {}` to `config/settings.py` to fix the missing setting error from `django-revproxy`. +- Restart `django-dev.service`. +- Verify port 5555 is listening (Flower). + +Changed: +* `config/settings.py`: Added `REVPROXY = {}`. + +Next: Try accessing `/flower/` again. +Reminder: click Save in the editor to sync changes. \ No newline at end of file diff --git a/celery.log b/celery.log index 78b9646..2efb184 100644 --- a/celery.log +++ b/celery.log @@ -207,3 +207,18 @@ For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/St [2026-02-09 19:20:39,598: INFO/MainProcess] Task core.tasks.generate_summary[cfcfea70-d5a2-4694-9467-45333ac44d3f] received [2026-02-09 19:20:40,610: INFO/ForkPoolWorker-2] Task core.tasks.process_bookmark[e19646b8-ea58-48a7-89e1-3d0429b9030a] succeeded in 24.209723198961s: 'Processed bookmark 30' [2026-02-09 19:20:51,094: INFO/ForkPoolWorker-1] Task core.tasks.generate_summary[cfcfea70-d5a2-4694-9467-45333ac44d3f] succeeded in 8.763452520011924s: None +[2026-02-09 19:25:41,119: INFO/MainProcess] Task core.tasks.process_bookmark[085eedb9-d96e-4e98-9af3-d92dffa37cdd] received +[2026-02-09 19:25:50,124: INFO/ForkPoolWorker-2] HTTP Request: GET https://facebook.com "HTTP/1.1 301 Moved Permanently" +[2026-02-09 19:25:50,634: INFO/ForkPoolWorker-2] HTTP Request: GET https://www.facebook.com/ "HTTP/1.1 400 Bad Request" +[2026-02-09 19:25:50,872: WARNING/ForkPoolWorker-2] Error fetching bookmark 31 (https://facebook.com): Client error '400 Bad Request' for url 'https://www.facebook.com/' +For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400. Trying base domain backup. +[2026-02-09 19:25:50,873: ERROR/ForkPoolWorker-2] Error fetching base domain for bookmark 31: Client error '400 Bad Request' for url 'https://www.facebook.com/' +For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400 +[2026-02-09 19:25:51,375: INFO/MainProcess] Task core.tasks.generate_summary[c0e9c502-a19a-4381-8b35-14420e55c69c] received +[2026-02-09 19:25:51,615: INFO/ForkPoolWorker-2] Task core.tasks.process_bookmark[085eedb9-d96e-4e98-9af3-d92dffa37cdd] succeeded in 7.494607769011054s: 'Processed bookmark 31' +[2026-02-09 19:25:52,897: INFO/ForkPoolWorker-1] Generating summary/tags for bookmark 31... +[2026-02-09 19:26:10,621: INFO/ForkPoolWorker-1] AI Raw Response for 31: { + "summary": "The webpage content could not be retrieved from https://facebook.com or its base domain. The fetch failed, so no further analysis is available from the provided source." +} +[2026-02-09 19:26:10,625: INFO/ForkPoolWorker-1] Decoded JSON for 31: summary=True, tags=[] +[2026-02-09 19:26:10,872: INFO/ForkPoolWorker-1] Task core.tasks.generate_summary[c0e9c502-a19a-4381-8b35-14420e55c69c] succeeded in 19.491886807023548s: 'Generated summary for bookmark 31' diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index a9b1d17..caf5d2c 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index e4d343c..ddfc0ee 100644 --- a/config/settings.py +++ b/config/settings.py @@ -14,6 +14,11 @@ from pathlib import Path import os from dotenv import load_dotenv +# Monkeypatch for django-revproxy compatibility with newer Werkzeug +import werkzeug.urls +if not hasattr(werkzeug.urls, "QUOTE_SPACES_AS_PLUS"): + werkzeug.urls.QUOTE_SPACES_AS_PLUS = "%2B" + BASE_DIR = Path(__file__).resolve().parent.parent load_dotenv(BASE_DIR.parent / ".env") @@ -213,6 +218,9 @@ CELERY_TIMEZONE = TIME_ZONE CELERY_TASK_ALWAYS_EAGER = False CELERY_TASK_EAGER_PROPAGATES = True +# RevProxy Settings +REVPROXY = {} + # Login/Logout Redirects LOGIN_REDIRECT_URL = 'home' LOGOUT_REDIRECT_URL = 'home' \ No newline at end of file