我太过勾手了,一个用于pre_start,另一个用于post_start。
nohup python foo.py > /dev/null &
ps aux
并发送有关它的电子邮件。 (这是一个带有shebang的Python脚本)现在。当我提交并推送重建开始时,它最终会在两个pre_start和post_start脚本之间产生无限循环:(
他们之间只有一些小消息,我不明白:
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python)
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python)
感谢您的帮助! :)
答案 0 :(得分:0)
我认为,这是正常的。你可以多次使用多个墨盒来调用你的钩子。在我的秋天4次......我必须处理这个问题,并使用后缀python-2.7
重命名我的钩子,所以:pre_start_python-2.7
。这样你只能运行一次。
以下是部署过程的事件日志:
remote: Preparing build for deployment
remote: Deployment id is 4e9628aa
remote: Activating deployment
remote: pre_start called
remote: Starting Cron cartridge
remote: post_start called
remote: pre_start called
remote: Starting MongoDB cartridge
remote: Waiting for mongo to start...
remote: post_start called
remote: pre_start called
remote: Starting RockMongo cartridge
remote: post_start called
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python)
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python)
remote: pre_start called
remote: Starting Python 2.7 cartridge (Apache+mod_wsgi)
remote: Application directory "/" selected as DocumentRoot
remote: Application "wsgi.py" selected as default WSGI entry point
remote: post_start called
remote: -------------------------
remote: Git Post-Receive Result: success