Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 2f9baa3..ee051ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x873f=['defaults','redis','localhost','./dashboardItem.socket','register','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http'];(function(_0x54d5ba,_0x1f1ba9){var _0x6a592e=function(_0x394f8d){while(--_0x394f8d){_0x54d5ba['push'](_0x54d5ba['shift']());}};_0x6a592e(++_0x1f1ba9);}(_0x873f,0x196));var _0xf873=function(_0x114254,_0x2de3b7){_0x114254=_0x114254-0x0;var _0x430032=_0x873f[_0x114254];return _0x430032;};'use strict';var _=require(_0xf873('0x0'));var util=require(_0xf873('0x1'));var moment=require(_0xf873('0x2'));var BPromise=require(_0xf873('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf873('0x4'));var db=require(_0xf873('0x5'))['db'];var utils=require(_0xf873('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xf873('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf873('0x8')][_0xf873('0x9')]({'port':0x232a});config['redis']=_[_0xf873('0xa')](config[_0xf873('0xb')],{'host':_0xf873('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xf873('0xd'))[_0xf873('0xe')](socket);function respondWithRpcPromise(_0xb7ed4e,_0x44d1a0,_0x3ade6a){return new BPromise(function(_0x44f9b5,_0x4cf032){return client[_0xf873('0xf')](_0xb7ed4e,_0x3ade6a)[_0xf873('0x10')](function(_0x3471d6){logger[_0xf873('0x11')](_0xf873('0x12'),_0x44d1a0,_0xf873('0x13'));logger[_0xf873('0x14')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x44d1a0,_0xf873('0x13'),JSON['stringify'](_0x3471d6));if(_0x3471d6['error']){if(_0x3471d6[_0xf873('0x15')][_0xf873('0x16')]===0x1f4){logger['error']('DashboardItem,\x20%s,\x20%s',_0x44d1a0,_0x3471d6[_0xf873('0x15')]['message']);return _0x4cf032(_0x3471d6['error'][_0xf873('0x17')]);}logger[_0xf873('0x15')](_0xf873('0x12'),_0x44d1a0,_0x3471d6[_0xf873('0x15')]['message']);return _0x44f9b5(_0x3471d6[_0xf873('0x15')][_0xf873('0x17')]);}else{logger[_0xf873('0x11')](_0xf873('0x12'),_0x44d1a0,_0xf873('0x13'));_0x44f9b5(_0x3471d6[_0xf873('0x18')]['message']);}})[_0xf873('0x19')](function(_0x437016){logger[_0xf873('0x15')](_0xf873('0x12'),_0x44d1a0,_0x437016);_0x4cf032(_0x437016);});});}
\ No newline at end of file
+var _0xcd44=['localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','info','DashboardItem,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0xcd44,0xa0));var _0x4cd4=function(_0x111dc3,_0x2a6fbd){_0x111dc3=_0x111dc3-0x0;var _0x59695c=_0xcd44[_0x111dc3];return _0x59695c;};'use strict';var _=require(_0x4cd4('0x0'));var util=require(_0x4cd4('0x1'));var moment=require(_0x4cd4('0x2'));var BPromise=require(_0x4cd4('0x3'));var rs=require(_0x4cd4('0x4'));var fs=require('fs');var Redis=require(_0x4cd4('0x5'));var db=require(_0x4cd4('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x4cd4('0x7'))(_0x4cd4('0x8'));var config=require(_0x4cd4('0x9'));var jayson=require(_0x4cd4('0xa'));var client=jayson[_0x4cd4('0xb')][_0x4cd4('0xc')]({'port':0x232a});config[_0x4cd4('0xd')]=_['defaults'](config[_0x4cd4('0xd')],{'host':_0x4cd4('0xe'),'port':0x18eb});var socket=require(_0x4cd4('0xf'))(new Redis(config[_0x4cd4('0xd')]));require(_0x4cd4('0x10'))[_0x4cd4('0x11')](socket);function respondWithRpcPromise(_0x5c5455,_0x53deec,_0x3d3598){return new BPromise(function(_0x2bf113,_0x314812){return client[_0x4cd4('0x12')](_0x5c5455,_0x3d3598)[_0x4cd4('0x13')](function(_0x261638){logger[_0x4cd4('0x14')](_0x4cd4('0x15'),_0x53deec,'request\x20sent');logger[_0x4cd4('0x16')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x53deec,_0x4cd4('0x17'),JSON[_0x4cd4('0x18')](_0x261638));if(_0x261638[_0x4cd4('0x19')]){if(_0x261638[_0x4cd4('0x19')]['code']===0x1f4){logger[_0x4cd4('0x19')](_0x4cd4('0x15'),_0x53deec,_0x261638[_0x4cd4('0x19')][_0x4cd4('0x1a')]);return _0x314812(_0x261638[_0x4cd4('0x19')][_0x4cd4('0x1a')]);}logger['error'](_0x4cd4('0x15'),_0x53deec,_0x261638[_0x4cd4('0x19')][_0x4cd4('0x1a')]);return _0x2bf113(_0x261638[_0x4cd4('0x19')][_0x4cd4('0x1a')]);}else{logger[_0x4cd4('0x14')](_0x4cd4('0x15'),_0x53deec,_0x4cd4('0x17'));_0x2bf113(_0x261638[_0x4cd4('0x1b')][_0x4cd4('0x1a')]);}})[_0x4cd4('0x1c')](function(_0x573181){logger[_0x4cd4('0x19')](_0x4cd4('0x15'),_0x53deec,_0x573181);_0x314812(_0x573181);});});}
\ No newline at end of file