I have recently created a version control page from my application to manage the deployment process.
(Yeah, I know, github + hooks are better than rewriting from zero. But we are in Iran and our beloved government has blocked all the ssh connections to outside of the country. :(( )
There is a merge + reload action in the page. the merge is working like the other parts, but the reload part fails without any message. I have added sudo row for kill command and the user of the worker process has enough permission. I even executed the code form django shell and it reloaded the process.
Is there any restriction for receiving signals, such as workers not being able to reload their master?
Here's the related codes:
def command(x):
return str(Popen(x.split(' '), stdout=PIPE).communicate()[0])
pid = open(PATH + "/logs/gunicorn.pid").readline().strip()
cmd = "sudo kill -HUP %s" % pid
content += command(cmd)