mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
Update backend/app/workers/queue_worker.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -85,7 +85,7 @@ def _auto_import_handlers() -> None:
|
|||||||
# If executed as a script (no package), make 'app' importable and alias this
|
# If executed as a script (no package), make 'app' importable and alias this
|
||||||
# module as 'app.workers.queue_worker' so that handler relative imports work
|
# module as 'app.workers.queue_worker' so that handler relative imports work
|
||||||
if not pkg_name:
|
if not pkg_name:
|
||||||
backend_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) # .../backend
|
backend_dir = os.path.abspath(os.path.join(__file__, '../../..')) # .../backend
|
||||||
if backend_dir not in sys.path:
|
if backend_dir not in sys.path:
|
||||||
sys.path.insert(0, backend_dir)
|
sys.path.insert(0, backend_dir)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user