Skip to content

1.8.0

Compare
Choose a tag to compare
@CheeseCake87 CheeseCake87 released this 07 Sep 08:58
· 17 commits to main since this release

Commands can be grouped and run as one using threading.

[tool.pyqwe]
group = [
    "flask_example.module:run",
    "*:gunicorn flask_example.package:create_app()",
    "*:flask --app flask_example/package run --port 5003"
]

Running pyqwe group results in:

🏎💨🏎💨🏎💨 Starting runners
[2024-09-07 09:55:00 +0100] [35190] [INFO] Starting gunicorn 23.0.0
[2024-09-07 09:55:00 +0100] [35190] [INFO] Listening at: http://127.0.0.1:8000 (35190)
[2024-09-07 09:55:00 +0100] [35190] [INFO] Using worker: sync
[2024-09-07 09:55:00 +0100] [35191] [INFO] Booting worker with pid: 35191
 * Serving Flask app 'flask_example.module'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit
 * Serving Flask app 'flask_example/package'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5003
Press CTRL+C to quit

Pressing ctrl + c will stop all runners as one.

^C 🏁🏎🏎🏎 Runners stopped
[2024-09-07 09:56:35 +0100] [35190] [INFO] Handling signal: int
[2024-09-07 09:56:35 +0100] [35191] [INFO] Worker exiting (pid: 35191)
[2024-09-07 09:56:35 +0100] [35190] [INFO] Shutting down: Master

This tool is intended only to be used in a development environment, say if you want to run Flask + Vite, or Flask + Tailwindcss in one process.