最近一直在忙着公司的手机小号业务,总结下用到的东西。
这个业务可以说是JS全栈。前端用AngularJS+MySQL(持久化) 后端 NodeJS+express+redis(临时存储)。日志文件用winston。底层的SYS模块使用mocha+chai+sinon做BDD测试。当然这个架构都是老师傅写好的,目前负责测试和部署顺便熟悉代码以便后期接手维护。
期间遇到很多难点,主要是对ES6的新特性缺乏了解,比如,生成器,比如,Promise。
测试是从底层的lua脚本开始:
redis-cli --ldb --eval ./prepare.lua HuaWeiAXB 'cp_cmd' hw 13157204810 13157204812 13157204813 13157204811
使用–ldb 可以在沙箱环境下执行lua脚本,而不会真正写入Redis。
Node后端记录的时间戳精确到毫秒,而Angular模板默认解析的到秒,要想页面上显示毫秒得使用模板过滤器:
<tr ng-repeat="item in searchResult">
<td></td>
<td></td>
<!--<td></td>-->
<!--<td></td>-->
<td ng-bind="item.partya"></td>
<td ng-bind="item.partyb"></td>
<td ng-bind="item.partyx"></td>
</tr>
后期为了性能和扩展性上docker集群,rabiitmq。
Kodi Debug Log.
11:00:50 T:1733399232 DEBUG: Activating window ID: 11108
11:00:50 T:1733399232 INFO: Activate of window '11108' refused because there are active modal dialogs
11:00:50 T:1733399232 DEBUG: ------ Window Deinit (DialogProgress.xml) ------
谷歌搜索后在Kodi的bug跟踪系统中找到:
http://trac.kodi.tv/ticket/15960
摘录解决问题的关键:
This problem is becoming a major issue with the Isengard builds. Any dialog that tries to open another window no longer works because of the modal dialog check (ie- using playercontrols.xml to open visualization or full screen video). I find myself having to put
Also, I don’t think the failure of the modal check should not be relegated to an INFO entry in the debugging log. It should show up as a WARNING at minimum. Having it only show up as an INFO makes it very difficult to diagnose.
Last edited at 2015-07-01T03:52:19+01:00 by ZexisStryfe
部署到服务器上Web应用-微信遥控器,在运行一段时间,访问出现如下情况:
504 Gateway Time-out
nginx/1.2.9
StackOverFlow上的找到的解答是, 重新设置ulimit ,查看本机:
服务器是阿里云的,部署的Tornado应用。
git add .
fatal: confused by unstable object source data for f7922e1d201945e62d84dc6a43c2a5c2102d9be7