Built motion from commit f7863d46.|2.5.41
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 320fe88..d2006f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0458=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','defaults','redis','./dashboardItem.socket','register','DashboardItem,\x20%s,\x20%s','request\x20sent','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash'];(function(_0x9d639c,_0x524dbe){var _0x1671de=function(_0x27888e){while(--_0x27888e){_0x9d639c['push'](_0x9d639c['shift']());}};_0x1671de(++_0x524dbe);}(_0x0458,0x17b));var _0x8045=function(_0x4e6665,_0x4f6947){_0x4e6665=_0x4e6665-0x0;var _0xdb1dd3=_0x0458[_0x4e6665];return _0xdb1dd3;};'use strict';var _=require(_0x8045('0x0'));var util=require(_0x8045('0x1'));var moment=require(_0x8045('0x2'));var BPromise=require(_0x8045('0x3'));var rs=require(_0x8045('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8045('0x5'))['db'];var utils=require(_0x8045('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0x8045('0x7')](config[_0x8045('0x8')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8045('0x8')]));require(_0x8045('0x9'))[_0x8045('0xa')](socket);function respondWithRpcPromise(_0x585f76,_0x19c005,_0x76e4ee){return new BPromise(function(_0x41b0e0,_0x7c4247){return client['request'](_0x585f76,_0x76e4ee)['then'](function(_0xf0c46d){logger['info'](_0x8045('0xb'),_0x19c005,_0x8045('0xc'));logger['debug'](_0x8045('0xd'),_0x19c005,'request\x20sent',JSON[_0x8045('0xe')](_0xf0c46d));if(_0xf0c46d[_0x8045('0xf')]){if(_0xf0c46d[_0x8045('0xf')]['code']===0x1f4){logger['error']('DashboardItem,\x20%s,\x20%s',_0x19c005,_0xf0c46d[_0x8045('0xf')]['message']);return _0x7c4247(_0xf0c46d[_0x8045('0xf')][_0x8045('0x10')]);}logger[_0x8045('0xf')](_0x8045('0xb'),_0x19c005,_0xf0c46d[_0x8045('0xf')]['message']);return _0x41b0e0(_0xf0c46d['error'][_0x8045('0x10')]);}else{logger[_0x8045('0x11')](_0x8045('0xb'),_0x19c005,_0x8045('0xc'));_0x41b0e0(_0xf0c46d[_0x8045('0x12')]['message']);}})[_0x8045('0x13')](function(_0x11da61){logger[_0x8045('0xf')]('DashboardItem,\x20%s,\x20%s',_0x19c005,_0x11da61);_0x7c4247(_0x11da61);});});}
\ No newline at end of file
+var _0xc860=['./dashboardItem.socket','register','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x513238,_0x1948ef){var _0x508dd0=function(_0x22035e){while(--_0x22035e){_0x513238['push'](_0x513238['shift']());}};_0x508dd0(++_0x1948ef);}(_0xc860,0x70));var _0x0c86=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0xc860[_0x2160a9];return _0xa88cf7;};'use strict';var _=require(_0x0c86('0x0'));var util=require('util');var moment=require(_0x0c86('0x1'));var BPromise=require(_0x0c86('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0c86('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0c86('0x4'));var logger=require(_0x0c86('0x5'))('rpc');var config=require(_0x0c86('0x6'));var jayson=require(_0x0c86('0x7'));var client=jayson[_0x0c86('0x8')][_0x0c86('0x9')]({'port':0x232a});config[_0x0c86('0xa')]=_['defaults'](config[_0x0c86('0xa')],{'host':_0x0c86('0xb'),'port':0x18eb});var socket=require(_0x0c86('0xc'))(new Redis(config[_0x0c86('0xa')]));require(_0x0c86('0xd'))[_0x0c86('0xe')](socket);function respondWithRpcPromise(_0x34a1e1,_0x373dce,_0x4360bf){return new BPromise(function(_0x5e164d,_0x16f85b){return client['request'](_0x34a1e1,_0x4360bf)[_0x0c86('0xf')](function(_0x506bda){logger[_0x0c86('0x10')](_0x0c86('0x11'),_0x373dce,_0x0c86('0x12'));logger[_0x0c86('0x13')](_0x0c86('0x14'),_0x373dce,_0x0c86('0x12'),JSON[_0x0c86('0x15')](_0x506bda));if(_0x506bda[_0x0c86('0x16')]){if(_0x506bda[_0x0c86('0x16')]['code']===0x1f4){logger[_0x0c86('0x16')](_0x0c86('0x11'),_0x373dce,_0x506bda[_0x0c86('0x16')][_0x0c86('0x17')]);return _0x16f85b(_0x506bda['error'][_0x0c86('0x17')]);}logger['error'](_0x0c86('0x11'),_0x373dce,_0x506bda[_0x0c86('0x16')][_0x0c86('0x17')]);return _0x5e164d(_0x506bda[_0x0c86('0x16')]['message']);}else{logger[_0x0c86('0x10')](_0x0c86('0x11'),_0x373dce,_0x0c86('0x12'));_0x5e164d(_0x506bda[_0x0c86('0x18')]['message']);}})['catch'](function(_0x279844){logger['error'](_0x0c86('0x11'),_0x373dce,_0x279844);_0x16f85b(_0x279844);});});}
\ No newline at end of file