PyCharm - 一键运行两个脚本/配置

问题描述 投票:1回答:1

我正在开发一个Django项目,我有经典的配置,所以我只需点击“运行”,开发服务器就会运行。但每次我正在研究这个项目时,我都需要从控制台运行芹菜。

是否可以添加celery命令,以便只需单击一下即可启动它们?

enter image description here

我想自动运行/停止此命令:

celery -A myproject.celery worker -l info --beat

enter image description here

ide pycharm
1个回答
2
投票

"Compound" Run Configuration可以并行启动一组其他运行配置。

您将需要BashSupport插件才能使用Bash脚本作为运行配置。然后,使用celery -A myproject.celery worker -l info --beat中的命令celery.sh,您可以创建复合运行配置,例如

example compound configuration

© www.soinside.com 2019 - 2024. All rights reserved.