Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / cmList / cmList.rpc.js
index a6e6c3b..ba765c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb1a7=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','./cmList.socket','request','then','CmList,\x20%s,\x20%s','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','error','code','message','info','result','moment','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb1a7,0x133));var _0x7b1a=function(_0xead2b9,_0x4460b5){_0xead2b9=_0xead2b9-0x0;var _0x2496b3=_0xb1a7[_0xead2b9];return _0x2496b3;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7b1a('0x0'));var BPromise=require('bluebird');var rs=require(_0x7b1a('0x1'));var fs=require('fs');var Redis=require(_0x7b1a('0x2'));var db=require(_0x7b1a('0x3'))['db'];var utils=require(_0x7b1a('0x4'));var logger=require(_0x7b1a('0x5'))(_0x7b1a('0x6'));var config=require(_0x7b1a('0x7'));var jayson=require(_0x7b1a('0x8'));var client=jayson[_0x7b1a('0x9')][_0x7b1a('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0x7b1a('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x7b1a('0xc'))['register'](socket);function respondWithRpcPromise(_0x38f9ee,_0x3add9a,_0x3b5340){return new BPromise(function(_0x1a88b6,_0x4ed464){return client[_0x7b1a('0xd')](_0x38f9ee,_0x3b5340)[_0x7b1a('0xe')](function(_0x3243cb){logger['info'](_0x7b1a('0xf'),_0x3add9a,_0x7b1a('0x10'));logger[_0x7b1a('0x11')](_0x7b1a('0x12'),_0x3add9a,'request\x20sent',JSON['stringify'](_0x3243cb));if(_0x3243cb[_0x7b1a('0x13')]){if(_0x3243cb[_0x7b1a('0x13')][_0x7b1a('0x14')]===0x1f4){logger[_0x7b1a('0x13')](_0x7b1a('0xf'),_0x3add9a,_0x3243cb[_0x7b1a('0x13')][_0x7b1a('0x15')]);return _0x4ed464(_0x3243cb[_0x7b1a('0x13')]['message']);}logger[_0x7b1a('0x13')](_0x7b1a('0xf'),_0x3add9a,_0x3243cb[_0x7b1a('0x13')][_0x7b1a('0x15')]);return _0x1a88b6(_0x3243cb[_0x7b1a('0x13')][_0x7b1a('0x15')]);}else{logger[_0x7b1a('0x16')](_0x7b1a('0xf'),_0x3add9a,'request\x20sent');_0x1a88b6(_0x3243cb[_0x7b1a('0x17')]['message']);}})['catch'](function(_0x404a01){logger[_0x7b1a('0x13')]('CmList,\x20%s,\x20%s',_0x3add9a,_0x404a01);_0x4ed464(_0x404a01);});});}
\ 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