Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 17feea4..eafff64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdfb4=['randomstring','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','./dashboardItem.socket','register','request','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xdfb4,0x1ad));var _0x4dfb=function(_0x2fc179,_0x5363c7){_0x2fc179=_0x2fc179-0x0;var _0x3fb02c=_0xdfb4[_0x2fc179];return _0x3fb02c;};'use strict';var _=require('lodash');var util=require(_0x4dfb('0x0'));var moment=require(_0x4dfb('0x1'));var BPromise=require(_0x4dfb('0x2'));var rs=require(_0x4dfb('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4dfb('0x4'))(_0x4dfb('0x5'));var config=require(_0x4dfb('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x4dfb('0x7')][_0x4dfb('0x8')]({'port':0x232a});config[_0x4dfb('0x9')]=_['defaults'](config[_0x4dfb('0x9')],{'host':_0x4dfb('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x4dfb('0xb'))[_0x4dfb('0xc')](socket);function respondWithRpcPromise(_0xfa2b1c,_0x470ae2,_0x3b86ca){return new BPromise(function(_0x489ab3,_0x57f9f6){return client[_0x4dfb('0xd')](_0xfa2b1c,_0x3b86ca)['then'](function(_0x55ce78){logger[_0x4dfb('0xe')](_0x4dfb('0xf'),_0x470ae2,_0x4dfb('0x10'));logger[_0x4dfb('0x11')](_0x4dfb('0x12'),_0x470ae2,_0x4dfb('0x10'),JSON['stringify'](_0x55ce78));if(_0x55ce78[_0x4dfb('0x13')]){if(_0x55ce78['error'][_0x4dfb('0x14')]===0x1f4){logger[_0x4dfb('0x13')](_0x4dfb('0xf'),_0x470ae2,_0x55ce78[_0x4dfb('0x13')][_0x4dfb('0x15')]);return _0x57f9f6(_0x55ce78[_0x4dfb('0x13')][_0x4dfb('0x15')]);}logger[_0x4dfb('0x13')](_0x4dfb('0xf'),_0x470ae2,_0x55ce78['error'][_0x4dfb('0x15')]);return _0x489ab3(_0x55ce78[_0x4dfb('0x13')][_0x4dfb('0x15')]);}else{logger[_0x4dfb('0xe')](_0x4dfb('0xf'),_0x470ae2,'request\x20sent');_0x489ab3(_0x55ce78[_0x4dfb('0x16')][_0x4dfb('0x15')]);}})[_0x4dfb('0x17')](function(_0x217838){logger['error'](_0x4dfb('0xf'),_0x470ae2,_0x217838);_0x57f9f6(_0x217838);});});}
\ No newline at end of file
+var _0x1733=['register','request','then','info','DashboardItem,\x20%s,\x20%s','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x462999,_0x24d200){var _0x4b1366=function(_0x1fa353){while(--_0x1fa353){_0x462999['push'](_0x462999['shift']());}};_0x4b1366(++_0x24d200);}(_0x1733,0x9f));var _0x3173=function(_0x40d7f8,_0x457196){_0x40d7f8=_0x40d7f8-0x0;var _0x1ce34a=_0x1733[_0x40d7f8];return _0x1ce34a;};'use strict';var _=require('lodash');var util=require(_0x3173('0x0'));var moment=require(_0x3173('0x1'));var BPromise=require(_0x3173('0x2'));var rs=require(_0x3173('0x3'));var fs=require('fs');var Redis=require(_0x3173('0x4'));var db=require(_0x3173('0x5'))['db'];var utils=require(_0x3173('0x6'));var logger=require('../../config/logger')(_0x3173('0x7'));var config=require(_0x3173('0x8'));var jayson=require(_0x3173('0x9'));var client=jayson[_0x3173('0xa')][_0x3173('0xb')]({'port':0x232a});config[_0x3173('0xc')]=_['defaults'](config[_0x3173('0xc')],{'host':_0x3173('0xd'),'port':0x18eb});var socket=require(_0x3173('0xe'))(new Redis(config[_0x3173('0xc')]));require('./dashboardItem.socket')[_0x3173('0xf')](socket);function respondWithRpcPromise(_0x3e4dca,_0x488784,_0x491fb8){return new BPromise(function(_0x5643ef,_0x3cba98){return client[_0x3173('0x10')](_0x3e4dca,_0x491fb8)[_0x3173('0x11')](function(_0x45fb75){logger[_0x3173('0x12')](_0x3173('0x13'),_0x488784,'request\x20sent');logger[_0x3173('0x14')](_0x3173('0x15'),_0x488784,_0x3173('0x16'),JSON[_0x3173('0x17')](_0x45fb75));if(_0x45fb75[_0x3173('0x18')]){if(_0x45fb75[_0x3173('0x18')][_0x3173('0x19')]===0x1f4){logger['error'](_0x3173('0x13'),_0x488784,_0x45fb75['error']['message']);return _0x3cba98(_0x45fb75[_0x3173('0x18')][_0x3173('0x1a')]);}logger[_0x3173('0x18')]('DashboardItem,\x20%s,\x20%s',_0x488784,_0x45fb75[_0x3173('0x18')][_0x3173('0x1a')]);return _0x5643ef(_0x45fb75['error']['message']);}else{logger[_0x3173('0x12')]('DashboardItem,\x20%s,\x20%s',_0x488784,_0x3173('0x16'));_0x5643ef(_0x45fb75[_0x3173('0x1b')]['message']);}})[_0x3173('0x1c')](function(_0x265ce6){logger[_0x3173('0x18')](_0x3173('0x13'),_0x488784,_0x265ce6);_0x3cba98(_0x265ce6);});});}
\ No newline at end of file