Fix for task "Celery Worker" not starting for launch option "Debug: FullStack"

This commit is contained in:
Orce MARINKOVSKI 2024-12-26 10:44:16 +00:00
parent 817c4f29c2
commit 7561702f2b
2 changed files with 59 additions and 48 deletions

View File

@ -14,7 +14,9 @@
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/src/manage.py", "program": "${workspaceFolder}/src/manage.py",
"args": ["runserver"], "args": [
"runserver"
],
"django": true, "django": true,
"console": "integratedTerminal", "console": "integratedTerminal",
"env": { "env": {
@ -27,7 +29,9 @@
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/src/manage.py", "program": "${workspaceFolder}/src/manage.py",
"args": ["document_consumer"], "args": [
"document_consumer"
],
"django": true, "django": true,
"console": "integratedTerminal", "console": "integratedTerminal",
"env": { "env": {
@ -35,7 +39,6 @@
}, },
"python": "${workspaceFolder}/.venv/bin/python" "python": "${workspaceFolder}/.venv/bin/python"
} }
], ],
"compounds": [ "compounds": [
{ {
@ -44,7 +47,8 @@
"Chrome: Debug Angular Frontend", "Chrome: Debug Angular Frontend",
"Debug: Backend Server (manage.py runserver)", "Debug: Backend Server (manage.py runserver)",
"Debug: Consumer Service (manage.py document_consumer)" "Debug: Consumer Service (manage.py document_consumer)"
] ],
"preLaunchTask": "Start: Celery Worker"
} }
] ]
} }

View File

@ -1,6 +1,34 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{
"label": "Start: Celery Worker",
"type": "shell",
"command": "pipenv run celery --app paperless worker -l DEBUG",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/src"
},
"problemMatcher": [
{
"owner": "custom",
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "celery.*",
"endsPattern": "ready"
}
}
],
"detail": ""
},
{ {
"label": "Start: Frontend Angular", "label": "Start: Frontend Angular",
"type": "shell", "type": "shell",
@ -28,27 +56,6 @@
} }
], ],
"detail": "triggered also by launch option Chrome: Debug Angular Frontend" "detail": "triggered also by launch option Chrome: Debug Angular Frontend"
},
{
"label": "Start: Celery Worker",
"type": "shell",
"command": "pipenv run celery --app paperless worker -l DEBUG",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
},
"options": {
"cwd": "${workspaceFolder}/src"
}
}, },
{ {
"label": "Start: Consumer Service (manage.py document_consumer)", "label": "Start: Consumer Service (manage.py document_consumer)",