【发布时间】:2010-11-08 18:54:01
【问题描述】:
我正在尝试在本地 Windows 机器上自动重新加载使用 apache + mod_wsgi 的 django 应用程序。
我想知道在哪里添加以下文章中引用的代码:
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
def _restart(path):
_queue.put(True)
prefix = 'monitor (pid=%d):' % os.getpid()
print >> sys.stderr, '%s Change detected to \'%s\'.' % (prefix, path)
print >> sys.stderr, '%s Triggering Apache restart.' % prefix
import ctypes
ctypes.windll.libhttpd.ap_signal_parent(1)
【问题讨论】: