简体   繁体   English

远程执行非阻塞过程

[英]Execute non-blocking process remotely

I am using paramiko to run a command on remote server. 我正在使用paramiko在远程服务器上运行命令。 This execution is initiated from a django website. 此执行从django网站启动。 I would not want the django website to be waiting while the command on the remote server is running ie I do not care what happens once the process is initiated. 我不希望django网站在远程服务器上的命令正在运行时等待,例如,我不关心启动该过程后会发生什么。

How can I run this command in a non-blocking manner from the website? 如何从网站以非阻塞方式运行此命令? I had used paramiko once and did notice that exec_command() waits for the remote command to complete before returning the control to the callee. 我曾经使用paramiko ,并且确实注意到exec_command()在将控件返回给被调用者之前等待远程命令完成。

plumbum is perfect for this. 是完美的。 The docs explain how you can run commands in the background , and how to integrate with paramiko . 该文档说明了如何在后台运行命令以及如何与paramiko集成。

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

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