简体   繁体   English

没有“nohup”python命令结果

[英]No “nohup” python command results

I'm developing a real time website. 我正在开发一个实时网站。 It's a map where the color of each city changes based on the current emotion. 这是一张地图,每个城市的颜色根据当前情绪而变化。

I have the python part which is connected to my database. 我有python部分连接到我的数据库。 So whenever I run the python code a new record is added to the database. 因此,每当我运行python代码时,都会向数据库添加一条新记录。 - it's a streaming code so it's never ending. - 这是一个流媒体代码,所以它永远不会结束。

The command line that is suitable for my python code is (nohup) since I want it always running. 适合我的python代码的命令行是(nohup),因为我希望它始终运行。

I'm using (Bluehost) as hosting server - VPS package. 我正在使用(Bluehost)作为托管服务器--VPS包。

I opened my SSH command line and run the command: 我打开SSH命令行并运行命令: 在此输入图像描述

So this means it's working? 这意味着它有效吗? It created an out file but no record is added to the database! 它创建了一个out文件,但没有记录添加到数据库中!

What's the problem? 有什么问题? Thank you 谢谢

The line Exit 2 means that there is a problem. Exit 2Exit 2表示存在问题。 You'll find a description in nohup.out (see the line that says ignoring input and appending nohup.out ) 你会在nohup.out找到一个描述(参见ignoring input and appending nohup.out

For a hint more clarity: the line that has Exit ... means the process called through nohup has terminated. 为了提示更清晰:具有Exit ...的行表示通过nohup调用的进程已终止。 The integer generally has meaning ( more on those here ), but you need to look at the actual nohup.out file before you'll learn anything. 整数通常具有意义( 这里更多内容 ),但是在学习任何东西之前,你需要查看实际的nohup.out文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM