一键运行两个脚本/配置 [英] Run two scripts/configurations in one click

查看:67
本文介绍了一键运行两个脚本/配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个 Django 项目,我有经典配置,所以我只需点击运行"即可.并且开发服务器正在运行.但是每次我处理这个项目时,我都需要从控制台运行 Celery.

是否可以添加 celery 命令,以便一键启动?

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

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

解决方案

I'm working on a Django project and I have classic configuration so I just click on "run" and development server is running. But I need to run Celery from console every time I'm working on this project.

Is it possible to add the celery command so both are started just using one click?

I want to automatically run/stop this command:

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

解决方案

The "Compound" Run Configuration can start a group of other Run Configurations in parallel.

You will need the BashSupport plugin in order to use a Bash script as a run configuration. Then, with your command celery -A myproject.celery worker -l info --beat in celery.sh, you can create a compound run configuration , e.g.

这篇关于一键运行两个脚本/配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆