Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / cmList / cmList.rpc.js
index 84c3d64..b65ae71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x51ce=['../../config/environment','client','http','defaults','redis','./cmList.socket','register','info','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','stringify','error','code','CmList,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x3c8750,_0x101df8){var _0x2a2c98=function(_0x4b65db){while(--_0x4b65db){_0x3c8750['push'](_0x3c8750['shift']());}};_0x2a2c98(++_0x101df8);}(_0x51ce,0xd9));var _0xe51c=function(_0x254076,_0x5e7b8d){_0x254076=_0x254076-0x0;var _0x21a93e=_0x51ce[_0x254076];return _0x21a93e;};'use strict';var _=require(_0xe51c('0x0'));var util=require(_0xe51c('0x1'));var moment=require(_0xe51c('0x2'));var BPromise=require(_0xe51c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe51c('0x4'));var db=require(_0xe51c('0x5'))['db'];var utils=require(_0xe51c('0x6'));var logger=require(_0xe51c('0x7'))('rpc');var config=require(_0xe51c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xe51c('0x9')][_0xe51c('0xa')]({'port':0x232a});config['redis']=_[_0xe51c('0xb')](config[_0xe51c('0xc')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe51c('0xc')]));require(_0xe51c('0xd'))[_0xe51c('0xe')](socket);function respondWithRpcPromise(_0x514315,_0x4fc5a2,_0x3539c2){return new BPromise(function(_0xfd6183,_0x45bbf3){return client['request'](_0x514315,_0x3539c2)['then'](function(_0x58922a){logger[_0xe51c('0xf')]('CmList,\x20%s,\x20%s',_0x4fc5a2,_0xe51c('0x10'));logger[_0xe51c('0x11')](_0xe51c('0x12'),_0x4fc5a2,_0xe51c('0x10'),JSON[_0xe51c('0x13')](_0x58922a));if(_0x58922a[_0xe51c('0x14')]){if(_0x58922a['error'][_0xe51c('0x15')]===0x1f4){logger[_0xe51c('0x14')](_0xe51c('0x16'),_0x4fc5a2,_0x58922a[_0xe51c('0x14')][_0xe51c('0x17')]);return _0x45bbf3(_0x58922a['error'][_0xe51c('0x17')]);}logger[_0xe51c('0x14')](_0xe51c('0x16'),_0x4fc5a2,_0x58922a[_0xe51c('0x14')]['message']);return _0xfd6183(_0x58922a['error'][_0xe51c('0x17')]);}else{logger[_0xe51c('0xf')]('CmList,\x20%s,\x20%s',_0x4fc5a2,_0xe51c('0x10'));_0xfd6183(_0x58922a[_0xe51c('0x18')]['message']);}})['catch'](function(_0x2de36b){logger[_0xe51c('0x14')](_0xe51c('0x16'),_0x4fc5a2,_0x2de36b);_0x45bbf3(_0x2de36b);});});}
\ No newline at end of file
+var _0x4cda=['client','http','redis','localhost','socket.io-emitter','register','request','then','info','CmList,\x20%s,\x20%s','debug','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x3a081b,_0x516437){var _0xb166c4=function(_0x22bc5d){while(--_0x22bc5d){_0x3a081b['push'](_0x3a081b['shift']());}};_0xb166c4(++_0x516437);}(_0x4cda,0x6a));var _0xa4cd=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0x4cda[_0x243b2f];return _0xcb3c2d;};'use strict';var _=require(_0xa4cd('0x0'));var util=require(_0xa4cd('0x1'));var moment=require(_0xa4cd('0x2'));var BPromise=require(_0xa4cd('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa4cd('0x4'));var db=require(_0xa4cd('0x5'))['db'];var utils=require(_0xa4cd('0x6'));var logger=require(_0xa4cd('0x7'))(_0xa4cd('0x8'));var config=require('../../config/environment');var jayson=require(_0xa4cd('0x9'));var client=jayson[_0xa4cd('0xa')][_0xa4cd('0xb')]({'port':0x232a});config[_0xa4cd('0xc')]=_['defaults'](config[_0xa4cd('0xc')],{'host':_0xa4cd('0xd'),'port':0x18eb});var socket=require(_0xa4cd('0xe'))(new Redis(config[_0xa4cd('0xc')]));require('./cmList.socket')[_0xa4cd('0xf')](socket);function respondWithRpcPromise(_0x58eba6,_0x24ecfc,_0x1508db){return new BPromise(function(_0x15ba04,_0x15a8e6){return client[_0xa4cd('0x10')](_0x58eba6,_0x1508db)[_0xa4cd('0x11')](function(_0x4eb4e7){logger[_0xa4cd('0x12')](_0xa4cd('0x13'),_0x24ecfc,'request\x20sent');logger[_0xa4cd('0x14')](_0xa4cd('0x15'),_0x24ecfc,_0xa4cd('0x16'),JSON[_0xa4cd('0x17')](_0x4eb4e7));if(_0x4eb4e7[_0xa4cd('0x18')]){if(_0x4eb4e7['error'][_0xa4cd('0x19')]===0x1f4){logger[_0xa4cd('0x18')](_0xa4cd('0x13'),_0x24ecfc,_0x4eb4e7[_0xa4cd('0x18')][_0xa4cd('0x1a')]);return _0x15a8e6(_0x4eb4e7['error'][_0xa4cd('0x1a')]);}logger[_0xa4cd('0x18')](_0xa4cd('0x13'),_0x24ecfc,_0x4eb4e7[_0xa4cd('0x18')][_0xa4cd('0x1a')]);return _0x15ba04(_0x4eb4e7[_0xa4cd('0x18')][_0xa4cd('0x1a')]);}else{logger[_0xa4cd('0x12')](_0xa4cd('0x13'),_0x24ecfc,_0xa4cd('0x16'));_0x15ba04(_0x4eb4e7[_0xa4cd('0x1b')][_0xa4cd('0x1a')]);}})[_0xa4cd('0x1c')](function(_0x4755a9){logger[_0xa4cd('0x18')](_0xa4cd('0x13'),_0x24ecfc,_0x4755a9);_0x15a8e6(_0x4755a9);});});}
\ No newline at end of file