Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / cmList / cmList.rpc.js
index 652854c..ba765c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x80d3=['then','info','CmList,\x20%s,\x20%s','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','./cmList.socket','register','request'];(function(_0x596c43,_0x28647a){var _0x4e1315=function(_0x58e910){while(--_0x58e910){_0x596c43['push'](_0x596c43['shift']());}};_0x4e1315(++_0x28647a);}(_0x80d3,0x75));var _0x380d=function(_0x2ffe9c,_0x181dfe){_0x2ffe9c=_0x2ffe9c-0x0;var _0xa25adb=_0x80d3[_0x2ffe9c];return _0xa25adb;};'use strict';var _=require(_0x380d('0x0'));var util=require(_0x380d('0x1'));var moment=require(_0x380d('0x2'));var BPromise=require(_0x380d('0x3'));var rs=require(_0x380d('0x4'));var fs=require('fs');var Redis=require(_0x380d('0x5'));var db=require(_0x380d('0x6'))['db'];var utils=require(_0x380d('0x7'));var logger=require('../../config/logger')(_0x380d('0x8'));var config=require(_0x380d('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x380d('0xa')][_0x380d('0xb')]({'port':0x232a});config[_0x380d('0xc')]=_[_0x380d('0xd')](config[_0x380d('0xc')],{'host':_0x380d('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x380d('0xc')]));require(_0x380d('0xf'))[_0x380d('0x10')](socket);function respondWithRpcPromise(_0x7daea4,_0x148121,_0x431ea7){return new BPromise(function(_0x53a9cf,_0x98a96b){return client[_0x380d('0x11')](_0x7daea4,_0x431ea7)[_0x380d('0x12')](function(_0x17f856){logger[_0x380d('0x13')](_0x380d('0x14'),_0x148121,'request\x20sent');logger['debug'](_0x380d('0x15'),_0x148121,_0x380d('0x16'),JSON['stringify'](_0x17f856));if(_0x17f856[_0x380d('0x17')]){if(_0x17f856[_0x380d('0x17')]['code']===0x1f4){logger[_0x380d('0x17')](_0x380d('0x14'),_0x148121,_0x17f856[_0x380d('0x17')][_0x380d('0x18')]);return _0x98a96b(_0x17f856['error'][_0x380d('0x18')]);}logger[_0x380d('0x17')](_0x380d('0x14'),_0x148121,_0x17f856['error'][_0x380d('0x18')]);return _0x53a9cf(_0x17f856[_0x380d('0x17')][_0x380d('0x18')]);}else{logger[_0x380d('0x13')](_0x380d('0x14'),_0x148121,_0x380d('0x16'));_0x53a9cf(_0x17f856[_0x380d('0x19')][_0x380d('0x18')]);}})[_0x380d('0x1a')](function(_0x5118a4){logger['error'](_0x380d('0x14'),_0x148121,_0x5118a4);_0x98a96b(_0x5118a4);});});}
\ No newline at end of file
+var _0x59d0=['error','code','message','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','socket.io-emitter','./cmList.socket','register','request','then','CmList,\x20%s,\x20%s','debug','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x34bb68,_0x5b0079){var _0x3db9fb=function(_0x2c87bd){while(--_0x2c87bd){_0x34bb68['push'](_0x34bb68['shift']());}};_0x3db9fb(++_0x5b0079);}(_0x59d0,0xad));var _0x059d=function(_0x1a6817,_0x3cbd16){_0x1a6817=_0x1a6817-0x0;var _0x1ecee3=_0x59d0[_0x1a6817];return _0x1ecee3;};'use strict';var _=require(_0x059d('0x0'));var util=require(_0x059d('0x1'));var moment=require(_0x059d('0x2'));var BPromise=require('bluebird');var rs=require(_0x059d('0x3'));var fs=require('fs');var Redis=require(_0x059d('0x4'));var db=require(_0x059d('0x5'))['db'];var utils=require(_0x059d('0x6'));var logger=require(_0x059d('0x7'))('rpc');var config=require(_0x059d('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x059d('0x9')][_0x059d('0xa')]({'port':0x232a});config[_0x059d('0xb')]=_[_0x059d('0xc')](config[_0x059d('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x059d('0xd'))(new Redis(config['redis']));require(_0x059d('0xe'))[_0x059d('0xf')](socket);function respondWithRpcPromise(_0x28deed,_0x3ff977,_0x706df3){return new BPromise(function(_0xde161c,_0xbcb429){return client[_0x059d('0x10')](_0x28deed,_0x706df3)[_0x059d('0x11')](function(_0x588c8e){logger['info'](_0x059d('0x12'),_0x3ff977,'request\x20sent');logger[_0x059d('0x13')](_0x059d('0x14'),_0x3ff977,_0x059d('0x15'),JSON[_0x059d('0x16')](_0x588c8e));if(_0x588c8e['error']){if(_0x588c8e[_0x059d('0x17')][_0x059d('0x18')]===0x1f4){logger[_0x059d('0x17')](_0x059d('0x12'),_0x3ff977,_0x588c8e[_0x059d('0x17')][_0x059d('0x19')]);return _0xbcb429(_0x588c8e[_0x059d('0x17')][_0x059d('0x19')]);}logger[_0x059d('0x17')](_0x059d('0x12'),_0x3ff977,_0x588c8e[_0x059d('0x17')][_0x059d('0x19')]);return _0xde161c(_0x588c8e['error'][_0x059d('0x19')]);}else{logger[_0x059d('0x1a')](_0x059d('0x12'),_0x3ff977,_0x059d('0x15'));_0xde161c(_0x588c8e['result'][_0x059d('0x19')]);}})[_0x059d('0x1b')](function(_0x1e661a){logger['error'](_0x059d('0x12'),_0x3ff977,_0x1e661a);_0xbcb429(_0x1e661a);});});}
\ No newline at end of file