Git-Auto-Deploy icon indicating copy to clipboard operation
Git-Auto-Deploy copied to clipboard

reload failed

Open z1q1q7 opened this issue 5 years ago • 0 comments

When I use kill -SIGHUP pid to reload gitautodeploy process, the process quit with the following logs:

2019-03-20 20:13:12,640 [ERROR]  self.serve_forever()
2019-03-20 20:13:12,640 [ERROR]  File "gitautodeploy/gitautodeploy.py", line 511, in serve_forever
2019-03-20 20:13:12,641 [ERROR]
2019-03-20 20:13:12,641 [ERROR]  os.chdir(wwwroot)
2019-03-20 20:13:12,641 [ERROR]  OSError
2019-03-20 20:13:12,641 [ERROR]  :
2019-03-20 20:13:12,641 [ERROR]  [Errno 2] No such file or directory: '................./gitautodeploy/wwwroot/gitautodeploy/wwwroot'
2019-03-20 20:13:12,641 [ERROR]

I found a bug here. After first start, the program change directory to wwwroot

wwwroot = os.path.join(os.path.dirname(os.path.realpath(__file__)), "wwwroot")
os.chdir(wwwroot)

When reload, wwwroot changed to a nested error place, so the program quit.

z1q1q7 avatar Mar 22 '19 07:03 z1q1q7