如何运行Daphne服务器(Django频道)&后台的工人? [英] How to run Daphne Server (Django Channels) & workers in the background?

查看:362
本文介绍了如何运行Daphne服务器(Django频道)&后台的工人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Django Channels。我正在尝试运行以下命令来运行Daphne服务器和工作线程。

I have installed Django Channels. I am trying to run the following commands to run Daphne server and a worker.

> daphne chat.asgi:channel_layer --port $PORT --bind 0.0.0.0 -v2
> python manage.py runworker -v2

但是每个命令都会打开一个显示日志的实时终端。我只想将它们作为后台进程运行。谁能告诉我该怎么做?

But each command opens up a live terminal showing logs. I just want to run them as background processes. Can anyone show me how to do this?

推荐答案

对于这些类型的任务,应使用主管

For these type of tasks, you should use supervisor.

这篇关于如何运行Daphne服务器(Django频道)&后台的工人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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