Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 189fa7c..a4f45dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x064f=['client','redis','defaults','localhost','./dashboardItem.socket','register','request','then','DashboardItem,\x20%s,\x20%s','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x064f,0xfa));var _0xf064=function(_0x5c2e3e,_0x26ecd3){_0x5c2e3e=_0x5c2e3e-0x0;var _0x53f64a=_0x064f[_0x5c2e3e];return _0x53f64a;};'use strict';var _=require(_0xf064('0x0'));var util=require(_0xf064('0x1'));var moment=require('moment');var BPromise=require(_0xf064('0x2'));var rs=require(_0xf064('0x3'));var fs=require('fs');var Redis=require(_0xf064('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf064('0x5'));var logger=require(_0xf064('0x6'))(_0xf064('0x7'));var config=require(_0xf064('0x8'));var jayson=require(_0xf064('0x9'));var client=jayson[_0xf064('0xa')]['http']({'port':0x232a});config[_0xf064('0xb')]=_[_0xf064('0xc')](config[_0xf064('0xb')],{'host':_0xf064('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf064('0xb')]));require(_0xf064('0xe'))[_0xf064('0xf')](socket);function respondWithRpcPromise(_0x236f22,_0x50b84f,_0x5e1b2e){return new BPromise(function(_0x2cb44b,_0x4855e6){return client[_0xf064('0x10')](_0x236f22,_0x5e1b2e)[_0xf064('0x11')](function(_0x50e8e1){logger['info'](_0xf064('0x12'),_0x50b84f,'request\x20sent');logger['debug'](_0xf064('0x13'),_0x50b84f,_0xf064('0x14'),JSON['stringify'](_0x50e8e1));if(_0x50e8e1[_0xf064('0x15')]){if(_0x50e8e1[_0xf064('0x15')][_0xf064('0x16')]===0x1f4){logger[_0xf064('0x15')]('DashboardItem,\x20%s,\x20%s',_0x50b84f,_0x50e8e1['error'][_0xf064('0x17')]);return _0x4855e6(_0x50e8e1[_0xf064('0x15')][_0xf064('0x17')]);}logger[_0xf064('0x15')](_0xf064('0x12'),_0x50b84f,_0x50e8e1[_0xf064('0x15')]['message']);return _0x2cb44b(_0x50e8e1[_0xf064('0x15')][_0xf064('0x17')]);}else{logger[_0xf064('0x18')]('DashboardItem,\x20%s,\x20%s',_0x50b84f,_0xf064('0x14'));_0x2cb44b(_0x50e8e1['result'][_0xf064('0x17')]);}})[_0xf064('0x19')](function(_0x48ca78){logger[_0xf064('0x15')]('DashboardItem,\x20%s,\x20%s',_0x50b84f,_0x48ca78);_0x4855e6(_0x48ca78);});});}
\ No newline at end of file
+var _0x75a4=['then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','redis','defaults','./dashboardItem.socket','register','request'];(function(_0x5cc7af,_0x9570d8){var _0x165552=function(_0x7b47a6){while(--_0x7b47a6){_0x5cc7af['push'](_0x5cc7af['shift']());}};_0x165552(++_0x9570d8);}(_0x75a4,0x181));var _0x475a=function(_0x244e9b,_0x3b30a2){_0x244e9b=_0x244e9b-0x0;var _0x7a2380=_0x75a4[_0x244e9b];return _0x7a2380;};'use strict';var _=require('lodash');var util=require(_0x475a('0x0'));var moment=require(_0x475a('0x1'));var BPromise=require('bluebird');var rs=require(_0x475a('0x2'));var fs=require('fs');var Redis=require(_0x475a('0x3'));var db=require(_0x475a('0x4'))['db'];var utils=require(_0x475a('0x5'));var logger=require('../../config/logger')(_0x475a('0x6'));var config=require('../../config/environment');var jayson=require(_0x475a('0x7'));var client=jayson[_0x475a('0x8')][_0x475a('0x9')]({'port':0x232a});config[_0x475a('0xa')]=_[_0x475a('0xb')](config[_0x475a('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x475a('0xc'))[_0x475a('0xd')](socket);function respondWithRpcPromise(_0x41706d,_0x393842,_0x14e062){return new BPromise(function(_0x510ce1,_0x2712f4){return client[_0x475a('0xe')](_0x41706d,_0x14e062)[_0x475a('0xf')](function(_0x5cb43d){logger[_0x475a('0x10')](_0x475a('0x11'),_0x393842,_0x475a('0x12'));logger['debug']('DashboardItem,\x20%s,\x20%s,\x20%s',_0x393842,_0x475a('0x12'),JSON[_0x475a('0x13')](_0x5cb43d));if(_0x5cb43d[_0x475a('0x14')]){if(_0x5cb43d[_0x475a('0x14')][_0x475a('0x15')]===0x1f4){logger[_0x475a('0x14')](_0x475a('0x11'),_0x393842,_0x5cb43d[_0x475a('0x14')]['message']);return _0x2712f4(_0x5cb43d[_0x475a('0x14')][_0x475a('0x16')]);}logger[_0x475a('0x14')]('DashboardItem,\x20%s,\x20%s',_0x393842,_0x5cb43d[_0x475a('0x14')][_0x475a('0x16')]);return _0x510ce1(_0x5cb43d[_0x475a('0x14')]['message']);}else{logger[_0x475a('0x10')](_0x475a('0x11'),_0x393842,_0x475a('0x12'));_0x510ce1(_0x5cb43d[_0x475a('0x17')][_0x475a('0x16')]);}})[_0x475a('0x18')](function(_0x2f4fca){logger[_0x475a('0x14')](_0x475a('0x11'),_0x393842,_0x2f4fca);_0x2712f4(_0x2f4fca);});});}
\ No newline at end of file