diff --git a/.devcontainer/vscode/launch.json b/.devcontainer/vscode/launch.json index 44a213d80..b21226630 100644 --- a/.devcontainer/vscode/launch.json +++ b/.devcontainer/vscode/launch.json @@ -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" } ] } diff --git a/.devcontainer/vscode/tasks.json b/.devcontainer/vscode/tasks.json index e9213017c..d7eaf9d3f 100644 --- a/.devcontainer/vscode/tasks.json +++ b/.devcontainer/vscode/tasks.json @@ -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)",