Built motion from commit ede67897.|2.6.29
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 9589a0d..c4b4b8e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82cb=['info','DashboardItem,\x20%s,\x20%s','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','moment','randomstring','ioredis','../../config/logger','rpc','jayson/promise','http','redis','defaults','socket.io-emitter','register','request'];(function(_0x5b043a,_0x3959ce){var _0x439e4c=function(_0x421203){while(--_0x421203){_0x5b043a['push'](_0x5b043a['shift']());}};_0x439e4c(++_0x3959ce);}(_0x82cb,0x1a8));var _0xb82c=function(_0x2bae45,_0x35ae0f){_0x2bae45=_0x2bae45-0x0;var _0x5f5da3=_0x82cb[_0x2bae45];return _0x5f5da3;};'use strict';var _=require(_0xb82c('0x0'));var util=require('util');var moment=require(_0xb82c('0x1'));var BPromise=require('bluebird');var rs=require(_0xb82c('0x2'));var fs=require('fs');var Redis=require(_0xb82c('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb82c('0x4'))(_0xb82c('0x5'));var config=require('../../config/environment');var jayson=require(_0xb82c('0x6'));var client=jayson['client'][_0xb82c('0x7')]({'port':0x232a});config[_0xb82c('0x8')]=_[_0xb82c('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xb82c('0xa'))(new Redis(config[_0xb82c('0x8')]));require('./dashboardItem.socket')[_0xb82c('0xb')](socket);function respondWithRpcPromise(_0x4cb398,_0xc3ba74,_0x28a95c){return new BPromise(function(_0x502b1b,_0x1d0bab){return client[_0xb82c('0xc')](_0x4cb398,_0x28a95c)['then'](function(_0x240cb6){logger[_0xb82c('0xd')](_0xb82c('0xe'),_0xc3ba74,'request\x20sent');logger[_0xb82c('0xf')](_0xb82c('0x10'),_0xc3ba74,_0xb82c('0x11'),JSON[_0xb82c('0x12')](_0x240cb6));if(_0x240cb6[_0xb82c('0x13')]){if(_0x240cb6[_0xb82c('0x13')][_0xb82c('0x14')]===0x1f4){logger[_0xb82c('0x13')](_0xb82c('0xe'),_0xc3ba74,_0x240cb6[_0xb82c('0x13')][_0xb82c('0x15')]);return _0x1d0bab(_0x240cb6['error']['message']);}logger['error'](_0xb82c('0xe'),_0xc3ba74,_0x240cb6[_0xb82c('0x13')]['message']);return _0x502b1b(_0x240cb6[_0xb82c('0x13')][_0xb82c('0x15')]);}else{logger[_0xb82c('0xd')](_0xb82c('0xe'),_0xc3ba74,_0xb82c('0x11'));_0x502b1b(_0x240cb6['result'][_0xb82c('0x15')]);}})[_0xb82c('0x16')](function(_0xd67bf1){logger[_0xb82c('0x13')](_0xb82c('0xe'),_0xc3ba74,_0xd67bf1);_0x1d0bab(_0xd67bf1);});});}
\ No newline at end of file
+var _0xc9db=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','./dashboardItem.socket','register','request','then','info','request\x20sent','DashboardItem,\x20%s,\x20%s,\x20%s','error','code','DashboardItem,\x20%s,\x20%s','message','result','catch','util','bluebird','randomstring','ioredis'];(function(_0x29e8aa,_0x4d394a){var _0x7a6891=function(_0x1ec537){while(--_0x1ec537){_0x29e8aa['push'](_0x29e8aa['shift']());}};_0x7a6891(++_0x4d394a);}(_0xc9db,0x1b6));var _0xbc9d=function(_0x40c30a,_0x543fb2){_0x40c30a=_0x40c30a-0x0;var _0x40d9f3=_0xc9db[_0x40c30a];return _0x40d9f3;};'use strict';var _=require('lodash');var util=require(_0xbc9d('0x0'));var moment=require('moment');var BPromise=require(_0xbc9d('0x1'));var rs=require(_0xbc9d('0x2'));var fs=require('fs');var Redis=require(_0xbc9d('0x3'));var db=require(_0xbc9d('0x4'))['db'];var utils=require(_0xbc9d('0x5'));var logger=require(_0xbc9d('0x6'))('rpc');var config=require(_0xbc9d('0x7'));var jayson=require(_0xbc9d('0x8'));var client=jayson[_0xbc9d('0x9')][_0xbc9d('0xa')]({'port':0x232a});config[_0xbc9d('0xb')]=_['defaults'](config['redis'],{'host':_0xbc9d('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xbc9d('0xd'))[_0xbc9d('0xe')](socket);function respondWithRpcPromise(_0x211d74,_0x12e6fd,_0x4995ea){return new BPromise(function(_0x45aff5,_0x3a1b98){return client[_0xbc9d('0xf')](_0x211d74,_0x4995ea)[_0xbc9d('0x10')](function(_0x28def2){logger[_0xbc9d('0x11')]('DashboardItem,\x20%s,\x20%s',_0x12e6fd,_0xbc9d('0x12'));logger['debug'](_0xbc9d('0x13'),_0x12e6fd,'request\x20sent',JSON['stringify'](_0x28def2));if(_0x28def2[_0xbc9d('0x14')]){if(_0x28def2[_0xbc9d('0x14')][_0xbc9d('0x15')]===0x1f4){logger['error'](_0xbc9d('0x16'),_0x12e6fd,_0x28def2[_0xbc9d('0x14')][_0xbc9d('0x17')]);return _0x3a1b98(_0x28def2[_0xbc9d('0x14')][_0xbc9d('0x17')]);}logger[_0xbc9d('0x14')](_0xbc9d('0x16'),_0x12e6fd,_0x28def2['error'][_0xbc9d('0x17')]);return _0x45aff5(_0x28def2[_0xbc9d('0x14')][_0xbc9d('0x17')]);}else{logger[_0xbc9d('0x11')]('DashboardItem,\x20%s,\x20%s',_0x12e6fd,_0xbc9d('0x12'));_0x45aff5(_0x28def2[_0xbc9d('0x18')][_0xbc9d('0x17')]);}})[_0xbc9d('0x19')](function(_0x62c620){logger['error']('DashboardItem,\x20%s,\x20%s',_0x12e6fd,_0x62c620);_0x3a1b98(_0x62c620);});});}
\ No newline at end of file