feat: use root dir to start python and celery (#5515)

pull/5302/head^2
crazywoola 2 years ago committed by GitHub
parent dcec9d7bb7
commit 47a5d4527b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,44 +1,43 @@
{ {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Python: Celery", "name": "Python: Flask",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"module": "celery", "python": "${workspaceFolder}/api/.venv/bin/python",
"cwd": "${workspaceFolder}/api",
"envFile": ".env",
"module": "flask",
"justMyCode": true, "justMyCode": true,
"args": ["-A", "app.celery", "worker", "-P", "gevent", "-c", "1", "--loglevel", "info", "-Q", "dataset,generation,mail"], "jinja": true,
"envFile": "${workspaceFolder}/.env",
"env": { "env": {
"FLASK_APP": "app.py", "FLASK_APP": "app.py",
"FLASK_DEBUG": "1", "FLASK_DEBUG": "1",
"GEVENT_SUPPORT": "True" "GEVENT_SUPPORT": "True"
}, },
"console": "integratedTerminal", "args": [
"python": "${command:python.interpreterPath}" "run",
"--host=0.0.0.0",
"--port=5001",
]
}, },
{ {
"name": "Python: Flask", "name": "Python: Celery",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"module": "flask", "python": "${workspaceFolder}/api/.venv/bin/python",
"cwd": "${workspaceFolder}/api",
"module": "celery",
"justMyCode": true,
"envFile": ".env",
"console": "integratedTerminal",
"env": { "env": {
"FLASK_APP": "app.py", "FLASK_APP": "app.py",
"FLASK_DEBUG": "1", "FLASK_DEBUG": "1",
"GEVENT_SUPPORT": "True" "GEVENT_SUPPORT": "True"
}, },
"args": [ "args": ["-A", "app.celery", "worker", "-P", "gevent", "-c", "1", "--loglevel", "info", "-Q", "dataset,generation,mail"],
"run", },
"--host=0.0.0.0",
"--port=5001",
"--debug"
],
"jinja": true,
"justMyCode": true,
"python": "${command:python.interpreterPath}"
}
] ]
} }
Loading…
Cancel
Save