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,11 +14,13 @@
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/manage.py",
"args": ["runserver"],
"args": [
"runserver"
],
"django": true,
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
"PYTHONPATH": "${workspaceFolder}/src"
},
"python": "${workspaceFolder}/.venv/bin/python"
},
@ -27,15 +29,16 @@
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/manage.py",
"args": ["document_consumer"],
"args": [
"document_consumer"
],
"django": true,
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
"PYTHONPATH": "${workspaceFolder}/src"
},
"python": "${workspaceFolder}/.venv/bin/python"
}
],
"compounds": [
{
@ -44,7 +47,8 @@
"Chrome: Debug Angular Frontend",
"Debug: Backend Server (manage.py runserver)",
"Debug: Consumer Service (manage.py document_consumer)"
]
],
"preLaunchTask": "Start: Celery Worker"
}
]
}

View File

@ -1,54 +1,61 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start: Frontend Angular",
"type": "shell",
"command": "npm start",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/src-ui"
},
"problemMatcher": [
{
"owner": "custom",
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Compiled successfully"
}
}
],
"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"
},
"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",
"type": "shell",
"command": "npm start",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/src-ui"
},
"problemMatcher": [
{
"owner": "custom",
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Compiled successfully"
}
}
],
"detail": "triggered also by launch option Chrome: Debug Angular Frontend"
},
{
"label": "Start: Consumer Service (manage.py document_consumer)",