Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / cmList / cmList.rpc.js
index 7dc0a4f..cfa29d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb8f4=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./cmList.socket','register','then','CmList,\x20%s,\x20%s','CmList,\x20%s,\x20%s,\x20%s','stringify','error','message','info','request\x20sent','result','catch','lodash','util','moment'];(function(_0xb047f0,_0x3ef9bc){var _0x59f78d=function(_0x3a2191){while(--_0x3a2191){_0xb047f0['push'](_0xb047f0['shift']());}};_0x59f78d(++_0x3ef9bc);}(_0xb8f4,0x1eb));var _0x4b8f=function(_0x36c86c,_0x595834){_0x36c86c=_0x36c86c-0x0;var _0x3cc39c=_0xb8f4[_0x36c86c];return _0x3cc39c;};'use strict';var _=require(_0x4b8f('0x0'));var util=require(_0x4b8f('0x1'));var moment=require(_0x4b8f('0x2'));var BPromise=require(_0x4b8f('0x3'));var rs=require(_0x4b8f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4b8f('0x5'))['db'];var utils=require(_0x4b8f('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4b8f('0x7'));var jayson=require(_0x4b8f('0x8'));var client=jayson[_0x4b8f('0x9')][_0x4b8f('0xa')]({'port':0x232a});config[_0x4b8f('0xb')]=_[_0x4b8f('0xc')](config[_0x4b8f('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x4b8f('0xd'))(new Redis(config['redis']));require(_0x4b8f('0xe'))[_0x4b8f('0xf')](socket);function respondWithRpcPromise(_0x125f8f,_0x14a884,_0x1dea4a){return new BPromise(function(_0x262348,_0x3f883c){return client['request'](_0x125f8f,_0x1dea4a)[_0x4b8f('0x10')](function(_0x2d77e3){logger['info'](_0x4b8f('0x11'),_0x14a884,'request\x20sent');logger['debug'](_0x4b8f('0x12'),_0x14a884,'request\x20sent',JSON[_0x4b8f('0x13')](_0x2d77e3));if(_0x2d77e3[_0x4b8f('0x14')]){if(_0x2d77e3[_0x4b8f('0x14')]['code']===0x1f4){logger[_0x4b8f('0x14')](_0x4b8f('0x11'),_0x14a884,_0x2d77e3[_0x4b8f('0x14')]['message']);return _0x3f883c(_0x2d77e3['error'][_0x4b8f('0x15')]);}logger[_0x4b8f('0x14')](_0x4b8f('0x11'),_0x14a884,_0x2d77e3[_0x4b8f('0x14')][_0x4b8f('0x15')]);return _0x262348(_0x2d77e3[_0x4b8f('0x14')][_0x4b8f('0x15')]);}else{logger[_0x4b8f('0x16')]('CmList,\x20%s,\x20%s',_0x14a884,_0x4b8f('0x17'));_0x262348(_0x2d77e3[_0x4b8f('0x18')][_0x4b8f('0x15')]);}})[_0x4b8f('0x19')](function(_0x102e42){logger['error']('CmList,\x20%s,\x20%s',_0x14a884,_0x102e42);_0x3f883c(_0x102e42);});});}
\ No newline at end of file
+var _0x7e82=['jayson/promise','http','redis','defaults','socket.io-emitter','./cmList.socket','register','request','then','info','CmList,\x20%s,\x20%s','request\x20sent','CmList,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x276468,_0x29685a){var _0x36dc3a=function(_0x291f0a){while(--_0x291f0a){_0x276468['push'](_0x276468['shift']());}};_0x36dc3a(++_0x29685a);}(_0x7e82,0x105));var _0x27e8=function(_0x4ce634,_0x50d2b4){_0x4ce634=_0x4ce634-0x0;var _0x449246=_0x7e82[_0x4ce634];return _0x449246;};'use strict';var _=require(_0x27e8('0x0'));var util=require(_0x27e8('0x1'));var moment=require(_0x27e8('0x2'));var BPromise=require(_0x27e8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x27e8('0x4'));var db=require(_0x27e8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x27e8('0x6'))(_0x27e8('0x7'));var config=require(_0x27e8('0x8'));var jayson=require(_0x27e8('0x9'));var client=jayson['client'][_0x27e8('0xa')]({'port':0x232a});config[_0x27e8('0xb')]=_[_0x27e8('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x27e8('0xd'))(new Redis(config[_0x27e8('0xb')]));require(_0x27e8('0xe'))[_0x27e8('0xf')](socket);function respondWithRpcPromise(_0x1ba50c,_0x37166a,_0xb6219c){return new BPromise(function(_0x4266ec,_0x1cfa76){return client[_0x27e8('0x10')](_0x1ba50c,_0xb6219c)[_0x27e8('0x11')](function(_0x27b500){logger[_0x27e8('0x12')](_0x27e8('0x13'),_0x37166a,_0x27e8('0x14'));logger['debug'](_0x27e8('0x15'),_0x37166a,'request\x20sent',JSON['stringify'](_0x27b500));if(_0x27b500[_0x27e8('0x16')]){if(_0x27b500[_0x27e8('0x16')][_0x27e8('0x17')]===0x1f4){logger[_0x27e8('0x16')](_0x27e8('0x13'),_0x37166a,_0x27b500[_0x27e8('0x16')][_0x27e8('0x18')]);return _0x1cfa76(_0x27b500[_0x27e8('0x16')][_0x27e8('0x18')]);}logger[_0x27e8('0x16')]('CmList,\x20%s,\x20%s',_0x37166a,_0x27b500[_0x27e8('0x16')][_0x27e8('0x18')]);return _0x4266ec(_0x27b500[_0x27e8('0x16')][_0x27e8('0x18')]);}else{logger['info']('CmList,\x20%s,\x20%s',_0x37166a,_0x27e8('0x14'));_0x4266ec(_0x27b500[_0x27e8('0x19')]['message']);}})[_0x27e8('0x1a')](function(_0x17d68b){logger['error'](_0x27e8('0x13'),_0x37166a,_0x17d68b);_0x1cfa76(_0x17d68b);});});}
\ No newline at end of file