[2014-10-24 03:25:44.064] [ERROR] console - { [Error: ENOENT, no such file or directory '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp']
errno: 34,
code: 'ENOENT',
path: '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp',
syscall: 'stat' }
Error: ENOENT, no such file or directory '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp'
at Object.fs.statSync (fs.js:684:18)
at isFile (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:113:12)
at loadPath (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:74:7)
at Object.module.exports.load (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:39:9)
at FSWatcher. (/root/Desktop/wuxia/node_modules/pomelo/lib/common/service/handlerService.js:95:45)
at FSWatcher.EventEmitter.emit (events.js:98:17)
at FSEvent.FSWatcher._handle.onchange (fs.js:1039:12)
热更新机制机制 有个不足 如果我服务器端用的是svn 在执行svn update 服务器handler 热更新fs.watch代码回调函数里加了 fs.watch(p, function(event, name) { console.log(event,"================="+name); if(event === 'change') { console.log(event,"++++++++++++++++++++++++"+name); handlerMap[app.serverType] = Loader.load(p, app); } });
更新servers/game/handler/backpack.js 然后提交 服务器 更新 结果出现下面的堆栈
[2014-10-24 03:25:44.063] [ERROR] console - Caught exception:
[2014-10-24 03:25:44.064] [ERROR] console - { [Error: ENOENT, no such file or directory '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp'] errno: 34, code: 'ENOENT', path: '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp', syscall: 'stat' } Error: ENOENT, no such file or directory '/root/Desktop/wuxia/app/servers/game/handler/tempfile.tmp' at Object.fs.statSync (fs.js:684:18) at isFile (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:113:12) at loadPath (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:74:7) at Object.module.exports.load (/root/Desktop/wuxia/node_modules/pomelo-loader/lib/loader.js:39:9) at FSWatcher. (/root/Desktop/wuxia/node_modules/pomelo/lib/common/service/handlerService.js:95:45)
at FSWatcher.EventEmitter.emit (events.js:98:17)
at FSEvent.FSWatcher._handle.onchange (fs.js:1039:12)
[2014-10-24 03:25:44.066] [INFO] console - change =========================tempfile.tmp
[2014-10-24 03:25:44.066] [INFO] console - change =========================tempfile.tmp
[2014-10-24 03:25:44.066] [INFO] console - change ++++++++++++++++++++++++tempfile.tmp
[2014-10-24 03:25:44.080] [INFO] console - rename =========================tempfile.tmp
[2014-10-24 03:25:44.080] [INFO] console - rename =========================tempfile.tmp
[2014-10-24 03:25:44.081] [INFO] console - rename =========================backpack.js
[2014-10-24 03:25:44.081] [INFO] console - rename =========================backpack.js
svn 更新是这样 不知道其他的是git 是什么样子
另:我如果新加 handler 用svn 更新 是不是也更新不到