From 67024edd628ec37d81e5570d35b0445277aeefb9 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:21:07 -0500 Subject: [PATCH] shorter launch name and add runserver also install Werkzeug if using runserver_plus --- .vscode/launch.json | 70 ++++++++++++++++++++++++++------------------- .vscode/tasks.json | 5 ++++ 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 69db4e3c0ffe..506500e91284 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,75 +2,77 @@ "version": "0.2.0", "configurations": [ { - "name": "Python Debugger: run_ws_heartbeat", + "name": "run_ws_heartbeat", "type": "debugpy", "request": "launch", "program": "manage.py", "args": ["run_ws_heartbeat"], "django": true, - "preLaunchTask": "start awx-ws-heartbeat", - "postDebugTask": "stop awx-ws-heartbeat" + "preLaunchTask": "stop awx-ws-heartbeat", + "postDebugTask": "start awx-ws-heartbeat" }, { - "name": "Python Debugger: run_callback_receiver", + "name": "run_cache_clear", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_callback_receiver"], - "django": true + "args": ["run_cache_clear"], + "django": true, + "preLaunchTask": "stop awx-cache-clear", + "postDebugTask": "start awx-cache-clear" }, { - "name": "Python Debugger: run_dispatcher", + "name": "run_callback_receiver", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_dispatcher"], + "args": ["run_callback_receiver"], "django": true, - "preLaunchTask": "start awx-dispatcher", - "postDebugTask": "stop awx-dispatcher" + "preLaunchTask": "stop awx-receiver", + "postDebugTask": "start awx-receiver" }, { - "name": "Python Debugger: run_rsyslog_configurer", + "name": "run_dispatcher", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_rsyslog_configurer"], + "args": ["run_dispatcher"], "django": true, - "preLaunchTask": "start awx-rsyslog-configurer", - "postDebugTask": "stop awx-rsyslog-configurer" + "preLaunchTask": "stop awx-dispatcher", + "postDebugTask": "start awx-dispatcher" }, { - "name": "Python Debugger: run_cache_clear", + "name": "run_rsyslog_configurer", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_cache_clear"], + "args": ["run_rsyslog_configurer"], "django": true, - "preLaunchTask": "start awx-cache-clear", - "postDebugTask": "stop awx-cache-clear" + "preLaunchTask": "stop awx-rsyslog-configurer", + "postDebugTask": "start awx-rsyslog-configurer" }, { - "name": "Python Debugger: run_wsrelay", + "name": "run_cache_clear", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["run_wsrelay"], + "args": ["run_cache_clear"], "django": true, - "preLaunchTask": "start awx-wsrelay", - "postDebugTask": "stop awx-wsrelay" + "preLaunchTask": "stop awx-cache-clear", + "postDebugTask": "start awx-cache-clear" }, { - "name": "Python Debugger: run_wsrelay", + "name": "run_wsrelay", "type": "debugpy", "request": "launch", "program": "manage.py", "args": ["run_wsrelay"], "django": true, - "preLaunchTask": "start awx-wsrelay", - "postDebugTask": "stop awx-wsrelay" + "preLaunchTask": "stop awx-wsrelay", + "postDebugTask": "start awx-wsrelay" }, { - "name": "Python Debugger: daphne", + "name": "daphne", "type": "debugpy", "request": "launch", "program": "/var/lib/awx/venv/awx/bin/daphne", @@ -80,14 +82,24 @@ "postDebugTask": "start awx-daphne" }, { - "name": "Python Debugger: uwsgi", + "name": "runserver(uwsgi alternative)", "type": "debugpy", "request": "launch", "program": "manage.py", - "args": ["runserver_plus", "0.0.0.0:8052", "--threaded"], + "args": ["runserver", "0.0.0.0:8052"], "django": true, "preLaunchTask": "stop awx-uwsgi", "postDebugTask": "start awx-uwsgi" - } + }, + { + "name": "runserver_plus(uwsgi alternative)", + "type": "debugpy", + "request": "launch", + "program": "manage.py", + "args": ["runserver_plus", "0.0.0.0:8052"], + "django": true, + "preLaunchTask": "stop awx-uwsgi and install Werkzeug", + "postDebugTask": "start awx-uwsgi" + }, ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 249661546d34..0b878663c311 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -71,6 +71,11 @@ "type": "shell", "command": "supervisorctl stop tower-processes:awx-uwsgi" }, + { + "label": "stop awx-uwsgi and install Werkzeug", + "type": "shell", + "command": "pip install Werkzeug; supervisorctl stop tower-processes:awx-uwsgi" + }, { "label": "start awx-ws-heartbeat", "type": "shell",