Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / cmList / cmList.rpc.js
index 3aeac5a..3bf96e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedc8=['error','message','info','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','defaults','redis','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(_0x462fe4,_0x394d3e){var _0x82b23a=function(_0x2c071f){while(--_0x2c071f){_0x462fe4['push'](_0x462fe4['shift']());}};_0x82b23a(++_0x394d3e);}(_0xedc8,0x8c));var _0x8edc=function(_0x172747,_0x1732bd){_0x172747=_0x172747-0x0;var _0x509692=_0xedc8[_0x172747];return _0x509692;};'use strict';var _=require(_0x8edc('0x0'));var util=require(_0x8edc('0x1'));var moment=require('moment');var BPromise=require(_0x8edc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8edc('0x3'));var db=require(_0x8edc('0x4'))['db'];var utils=require(_0x8edc('0x5'));var logger=require(_0x8edc('0x6'))(_0x8edc('0x7'));var config=require('../../config/environment');var jayson=require(_0x8edc('0x8'));var client=jayson['client'][_0x8edc('0x9')]({'port':0x232a});config['redis']=_[_0x8edc('0xa')](config[_0x8edc('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x8edc('0xc'))(new Redis(config[_0x8edc('0xb')]));require(_0x8edc('0xd'))[_0x8edc('0xe')](socket);function respondWithRpcPromise(_0x135529,_0x96f4ab,_0x6a7800){return new BPromise(function(_0x141961,_0x24a912){return client[_0x8edc('0xf')](_0x135529,_0x6a7800)[_0x8edc('0x10')](function(_0x677cfe){logger['info'](_0x8edc('0x11'),_0x96f4ab,'request\x20sent');logger[_0x8edc('0x12')](_0x8edc('0x13'),_0x96f4ab,_0x8edc('0x14'),JSON[_0x8edc('0x15')](_0x677cfe));if(_0x677cfe['error']){if(_0x677cfe[_0x8edc('0x16')]['code']===0x1f4){logger[_0x8edc('0x16')](_0x8edc('0x11'),_0x96f4ab,_0x677cfe[_0x8edc('0x16')][_0x8edc('0x17')]);return _0x24a912(_0x677cfe[_0x8edc('0x16')]['message']);}logger[_0x8edc('0x16')]('CmList,\x20%s,\x20%s',_0x96f4ab,_0x677cfe[_0x8edc('0x16')][_0x8edc('0x17')]);return _0x141961(_0x677cfe[_0x8edc('0x16')][_0x8edc('0x17')]);}else{logger[_0x8edc('0x18')](_0x8edc('0x11'),_0x96f4ab,_0x8edc('0x14'));_0x141961(_0x677cfe[_0x8edc('0x19')][_0x8edc('0x17')]);}})[_0x8edc('0x1a')](function(_0x1378b7){logger['error'](_0x8edc('0x11'),_0x96f4ab,_0x1378b7);_0x24a912(_0x1378b7);});});}
\ No newline at end of file
+var _0xaab0=['jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','request\x20sent','CmList,\x20%s,\x20%s,\x20%s','stringify','error','code','CmList,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x49ce5d,_0x4eb106){var _0x43f4f7=function(_0x21b881){while(--_0x21b881){_0x49ce5d['push'](_0x49ce5d['shift']());}};_0x43f4f7(++_0x4eb106);}(_0xaab0,0x1b6));var _0x0aab=function(_0x4114dd,_0x2ad862){_0x4114dd=_0x4114dd-0x0;var _0x26f44c=_0xaab0[_0x4114dd];return _0x26f44c;};'use strict';var _=require(_0x0aab('0x0'));var util=require(_0x0aab('0x1'));var moment=require(_0x0aab('0x2'));var BPromise=require('bluebird');var rs=require(_0x0aab('0x3'));var fs=require('fs');var Redis=require(_0x0aab('0x4'));var db=require(_0x0aab('0x5'))['db'];var utils=require(_0x0aab('0x6'));var logger=require(_0x0aab('0x7'))(_0x0aab('0x8'));var config=require(_0x0aab('0x9'));var jayson=require(_0x0aab('0xa'));var client=jayson[_0x0aab('0xb')]['http']({'port':0x232a});config[_0x0aab('0xc')]=_[_0x0aab('0xd')](config['redis'],{'host':_0x0aab('0xe'),'port':0x18eb});var socket=require(_0x0aab('0xf'))(new Redis(config[_0x0aab('0xc')]));require('./cmList.socket')[_0x0aab('0x10')](socket);function respondWithRpcPromise(_0x6fbbe1,_0x3684e7,_0x2ca118){return new BPromise(function(_0x1249d8,_0x81b958){return client[_0x0aab('0x11')](_0x6fbbe1,_0x2ca118)[_0x0aab('0x12')](function(_0x4aaa6a){logger['info']('CmList,\x20%s,\x20%s',_0x3684e7,_0x0aab('0x13'));logger['debug'](_0x0aab('0x14'),_0x3684e7,'request\x20sent',JSON[_0x0aab('0x15')](_0x4aaa6a));if(_0x4aaa6a[_0x0aab('0x16')]){if(_0x4aaa6a['error'][_0x0aab('0x17')]===0x1f4){logger[_0x0aab('0x16')](_0x0aab('0x18'),_0x3684e7,_0x4aaa6a[_0x0aab('0x16')][_0x0aab('0x19')]);return _0x81b958(_0x4aaa6a['error'][_0x0aab('0x19')]);}logger['error']('CmList,\x20%s,\x20%s',_0x3684e7,_0x4aaa6a['error'][_0x0aab('0x19')]);return _0x1249d8(_0x4aaa6a[_0x0aab('0x16')]['message']);}else{logger['info'](_0x0aab('0x18'),_0x3684e7,_0x0aab('0x13'));_0x1249d8(_0x4aaa6a[_0x0aab('0x1a')]['message']);}})[_0x0aab('0x1b')](function(_0x539dd4){logger[_0x0aab('0x16')](_0x0aab('0x18'),_0x3684e7,_0x539dd4);_0x81b958(_0x539dd4);});});}
\ No newline at end of file