Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index d742c66..6770a52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd2a=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','socket.io-emitter','./dashboardItem.socket','register','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','randomstring'];(function(_0x1c5cd2,_0x277ceb){var _0x895e35=function(_0x4b4307){while(--_0x4b4307){_0x1c5cd2['push'](_0x1c5cd2['shift']());}};_0x895e35(++_0x277ceb);}(_0xcd2a,0x88));var _0xacd2=function(_0x269e23,_0x14d11c){_0x269e23=_0x269e23-0x0;var _0x69ad53=_0xcd2a[_0x269e23];return _0x69ad53;};'use strict';var _=require(_0xacd2('0x0'));var util=require(_0xacd2('0x1'));var moment=require(_0xacd2('0x2'));var BPromise=require('bluebird');var rs=require(_0xacd2('0x3'));var fs=require('fs');var Redis=require(_0xacd2('0x4'));var db=require(_0xacd2('0x5'))['db'];var utils=require(_0xacd2('0x6'));var logger=require(_0xacd2('0x7'))(_0xacd2('0x8'));var config=require(_0xacd2('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xacd2('0xa')][_0xacd2('0xb')]({'port':0x232a});config[_0xacd2('0xc')]=_['defaults'](config[_0xacd2('0xc')],{'host':_0xacd2('0xd'),'port':0x18eb});var socket=require(_0xacd2('0xe'))(new Redis(config['redis']));require(_0xacd2('0xf'))[_0xacd2('0x10')](socket);function respondWithRpcPromise(_0x285fd3,_0x1cb7c0,_0x1fbd4b){return new BPromise(function(_0x5cd14b,_0x440fa7){return client['request'](_0x285fd3,_0x1fbd4b)[_0xacd2('0x11')](function(_0x502567){logger[_0xacd2('0x12')](_0xacd2('0x13'),_0x1cb7c0,_0xacd2('0x14'));logger[_0xacd2('0x15')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x1cb7c0,_0xacd2('0x14'),JSON[_0xacd2('0x16')](_0x502567));if(_0x502567['error']){if(_0x502567[_0xacd2('0x17')][_0xacd2('0x18')]===0x1f4){logger[_0xacd2('0x17')](_0xacd2('0x13'),_0x1cb7c0,_0x502567['error'][_0xacd2('0x19')]);return _0x440fa7(_0x502567[_0xacd2('0x17')]['message']);}logger[_0xacd2('0x17')]('DashboardItem,\x20%s,\x20%s',_0x1cb7c0,_0x502567['error']['message']);return _0x5cd14b(_0x502567[_0xacd2('0x17')]['message']);}else{logger['info'](_0xacd2('0x13'),_0x1cb7c0,_0xacd2('0x14'));_0x5cd14b(_0x502567[_0xacd2('0x1a')][_0xacd2('0x19')]);}})[_0xacd2('0x1b')](function(_0xf79043){logger[_0xacd2('0x17')](_0xacd2('0x13'),_0x1cb7c0,_0xf79043);_0x440fa7(_0xf79043);});});}
\ No newline at end of file
+var _0x2d32=['../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','info','DashboardItem,\x20%s,\x20%s','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x26a8ec,_0x2b8eba){var _0x25724a=function(_0x358e0a){while(--_0x358e0a){_0x26a8ec['push'](_0x26a8ec['shift']());}};_0x25724a(++_0x2b8eba);}(_0x2d32,0x1b4));var _0x22d3=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x2d32[_0xbca1b1];return _0x4e1686;};'use strict';var _=require('lodash');var util=require(_0x22d3('0x0'));var moment=require(_0x22d3('0x1'));var BPromise=require(_0x22d3('0x2'));var rs=require(_0x22d3('0x3'));var fs=require('fs');var Redis=require(_0x22d3('0x4'));var db=require(_0x22d3('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x22d3('0x6'))(_0x22d3('0x7'));var config=require(_0x22d3('0x8'));var jayson=require(_0x22d3('0x9'));var client=jayson['client'][_0x22d3('0xa')]({'port':0x232a});config[_0x22d3('0xb')]=_['defaults'](config[_0x22d3('0xb')],{'host':_0x22d3('0xc'),'port':0x18eb});var socket=require(_0x22d3('0xd'))(new Redis(config[_0x22d3('0xb')]));require(_0x22d3('0xe'))[_0x22d3('0xf')](socket);function respondWithRpcPromise(_0x17ff74,_0x40f9b6,_0x4bfe65){return new BPromise(function(_0x8e5b99,_0x3c4e80){return client[_0x22d3('0x10')](_0x17ff74,_0x4bfe65)[_0x22d3('0x11')](function(_0x150d25){logger[_0x22d3('0x12')](_0x22d3('0x13'),_0x40f9b6,'request\x20sent');logger[_0x22d3('0x14')](_0x22d3('0x15'),_0x40f9b6,_0x22d3('0x16'),JSON['stringify'](_0x150d25));if(_0x150d25[_0x22d3('0x17')]){if(_0x150d25[_0x22d3('0x17')]['code']===0x1f4){logger[_0x22d3('0x17')](_0x22d3('0x13'),_0x40f9b6,_0x150d25['error']['message']);return _0x3c4e80(_0x150d25[_0x22d3('0x17')]['message']);}logger[_0x22d3('0x17')](_0x22d3('0x13'),_0x40f9b6,_0x150d25[_0x22d3('0x17')][_0x22d3('0x18')]);return _0x8e5b99(_0x150d25['error']['message']);}else{logger[_0x22d3('0x12')](_0x22d3('0x13'),_0x40f9b6,_0x22d3('0x16'));_0x8e5b99(_0x150d25['result'][_0x22d3('0x18')]);}})[_0x22d3('0x19')](function(_0x15c512){logger['error']('DashboardItem,\x20%s,\x20%s',_0x40f9b6,_0x15c512);_0x3c4e80(_0x15c512);});});}
\ No newline at end of file