Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index f5e7f6b..a2aaed1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf338=['stringify','error','code','message','result','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug'];(function(_0xdd0313,_0x251c2b){var _0x2bd7e8=function(_0x340f1f){while(--_0x340f1f){_0xdd0313['push'](_0xdd0313['shift']());}};_0x2bd7e8(++_0x251c2b);}(_0xf338,0x109));var _0x8f33=function(_0x36f688,_0x136a34){_0x36f688=_0x36f688-0x0;var _0x5483e4=_0xf338[_0x36f688];return _0x5483e4;};'use strict';var _=require(_0x8f33('0x0'));var util=require(_0x8f33('0x1'));var moment=require(_0x8f33('0x2'));var BPromise=require('bluebird');var rs=require(_0x8f33('0x3'));var fs=require('fs');var Redis=require(_0x8f33('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8f33('0x5'));var logger=require(_0x8f33('0x6'))(_0x8f33('0x7'));var config=require(_0x8f33('0x8'));var jayson=require(_0x8f33('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x8f33('0xa')]=_['defaults'](config['redis'],{'host':_0x8f33('0xb'),'port':0x18eb});var socket=require(_0x8f33('0xc'))(new Redis(config[_0x8f33('0xa')]));require(_0x8f33('0xd'))[_0x8f33('0xe')](socket);function respondWithRpcPromise(_0x564d5b,_0x59d014,_0xf1aa61){return new BPromise(function(_0x213efc,_0x2d5722){return client[_0x8f33('0xf')](_0x564d5b,_0xf1aa61)[_0x8f33('0x10')](function(_0x2f9f30){logger[_0x8f33('0x11')](_0x8f33('0x12'),_0x59d014,_0x8f33('0x13'));logger[_0x8f33('0x14')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x59d014,_0x8f33('0x13'),JSON[_0x8f33('0x15')](_0x2f9f30));if(_0x2f9f30[_0x8f33('0x16')]){if(_0x2f9f30[_0x8f33('0x16')][_0x8f33('0x17')]===0x1f4){logger[_0x8f33('0x16')]('DashboardItem,\x20%s,\x20%s',_0x59d014,_0x2f9f30[_0x8f33('0x16')]['message']);return _0x2d5722(_0x2f9f30[_0x8f33('0x16')][_0x8f33('0x18')]);}logger[_0x8f33('0x16')](_0x8f33('0x12'),_0x59d014,_0x2f9f30[_0x8f33('0x16')]['message']);return _0x213efc(_0x2f9f30[_0x8f33('0x16')][_0x8f33('0x18')]);}else{logger[_0x8f33('0x11')](_0x8f33('0x12'),_0x59d014,'request\x20sent');_0x213efc(_0x2f9f30[_0x8f33('0x19')][_0x8f33('0x18')]);}})['catch'](function(_0x386be8){logger[_0x8f33('0x16')](_0x8f33('0x12'),_0x59d014,_0x386be8);_0x2d5722(_0x386be8);});});}
\ No newline at end of file
+var _0x6405=['redis','defaults','localhost','register','info','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','DashboardItem,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http'];(function(_0x26c1dd,_0x63293b){var _0x40f336=function(_0x2d24ed){while(--_0x2d24ed){_0x26c1dd['push'](_0x26c1dd['shift']());}};_0x40f336(++_0x63293b);}(_0x6405,0x109));var _0x5640=function(_0x3c546f,_0x276e64){_0x3c546f=_0x3c546f-0x0;var _0x9f4e3d=_0x6405[_0x3c546f];return _0x9f4e3d;};'use strict';var _=require(_0x5640('0x0'));var util=require(_0x5640('0x1'));var moment=require(_0x5640('0x2'));var BPromise=require('bluebird');var rs=require(_0x5640('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5640('0x4'))['db'];var utils=require(_0x5640('0x5'));var logger=require('../../config/logger')(_0x5640('0x6'));var config=require(_0x5640('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x5640('0x8')][_0x5640('0x9')]({'port':0x232a});config[_0x5640('0xa')]=_[_0x5640('0xb')](config['redis'],{'host':_0x5640('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5640('0xa')]));require('./dashboardItem.socket')[_0x5640('0xd')](socket);function respondWithRpcPromise(_0x2976be,_0x7631b2,_0x9f4f57){return new BPromise(function(_0x442980,_0x40aa35){return client['request'](_0x2976be,_0x9f4f57)['then'](function(_0x432456){logger[_0x5640('0xe')]('DashboardItem,\x20%s,\x20%s',_0x7631b2,'request\x20sent');logger[_0x5640('0xf')](_0x5640('0x10'),_0x7631b2,_0x5640('0x11'),JSON[_0x5640('0x12')](_0x432456));if(_0x432456[_0x5640('0x13')]){if(_0x432456[_0x5640('0x13')][_0x5640('0x14')]===0x1f4){logger[_0x5640('0x13')](_0x5640('0x15'),_0x7631b2,_0x432456[_0x5640('0x13')][_0x5640('0x16')]);return _0x40aa35(_0x432456[_0x5640('0x13')][_0x5640('0x16')]);}logger['error'](_0x5640('0x15'),_0x7631b2,_0x432456[_0x5640('0x13')]['message']);return _0x442980(_0x432456[_0x5640('0x13')]['message']);}else{logger[_0x5640('0xe')](_0x5640('0x15'),_0x7631b2,_0x5640('0x11'));_0x442980(_0x432456[_0x5640('0x17')][_0x5640('0x16')]);}})[_0x5640('0x18')](function(_0x45d469){logger[_0x5640('0x13')](_0x5640('0x15'),_0x7631b2,_0x45d469);_0x40aa35(_0x45d469);});});}
\ No newline at end of file