Built motion from commit ab870f9e.|2.5.44
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 325eb8b..62d6d13 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3bf8=['client','http','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','info','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','message','DashboardItem,\x20%s,\x20%s','catch','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x41e705,_0x512a8){var _0x40a658=function(_0xd14f71){while(--_0xd14f71){_0x41e705['push'](_0x41e705['shift']());}};_0x40a658(++_0x512a8);}(_0x3bf8,0xf3));var _0x83bf=function(_0x379e78,_0xd86ac3){_0x379e78=_0x379e78-0x0;var _0x26065d=_0x3bf8[_0x379e78];return _0x26065d;};'use strict';var _=require(_0x83bf('0x0'));var util=require(_0x83bf('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x83bf('0x2'));var db=require(_0x83bf('0x3'))['db'];var utils=require(_0x83bf('0x4'));var logger=require(_0x83bf('0x5'))(_0x83bf('0x6'));var config=require(_0x83bf('0x7'));var jayson=require(_0x83bf('0x8'));var client=jayson[_0x83bf('0x9')][_0x83bf('0xa')]({'port':0x232a});config[_0x83bf('0xb')]=_[_0x83bf('0xc')](config[_0x83bf('0xb')],{'host':_0x83bf('0xd'),'port':0x18eb});var socket=require(_0x83bf('0xe'))(new Redis(config[_0x83bf('0xb')]));require(_0x83bf('0xf'))[_0x83bf('0x10')](socket);function respondWithRpcPromise(_0xd60561,_0x8995d6,_0x558c2a){return new BPromise(function(_0x2c4681,_0x33b699){return client[_0x83bf('0x11')](_0xd60561,_0x558c2a)[_0x83bf('0x12')](function(_0x27f6fe){logger[_0x83bf('0x13')]('DashboardItem,\x20%s,\x20%s',_0x8995d6,_0x83bf('0x14'));logger[_0x83bf('0x15')](_0x83bf('0x16'),_0x8995d6,_0x83bf('0x14'),JSON[_0x83bf('0x17')](_0x27f6fe));if(_0x27f6fe[_0x83bf('0x18')]){if(_0x27f6fe['error']['code']===0x1f4){logger[_0x83bf('0x18')]('DashboardItem,\x20%s,\x20%s',_0x8995d6,_0x27f6fe[_0x83bf('0x18')][_0x83bf('0x19')]);return _0x33b699(_0x27f6fe[_0x83bf('0x18')][_0x83bf('0x19')]);}logger[_0x83bf('0x18')](_0x83bf('0x1a'),_0x8995d6,_0x27f6fe[_0x83bf('0x18')][_0x83bf('0x19')]);return _0x2c4681(_0x27f6fe[_0x83bf('0x18')][_0x83bf('0x19')]);}else{logger[_0x83bf('0x13')](_0x83bf('0x1a'),_0x8995d6,_0x83bf('0x14'));_0x2c4681(_0x27f6fe['result'][_0x83bf('0x19')]);}})[_0x83bf('0x1b')](function(_0x198bd4){logger['error'](_0x83bf('0x1a'),_0x8995d6,_0x198bd4);_0x33b699(_0x198bd4);});});}
\ No newline at end of file
+var _0xc9e8=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','info','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','error','code','DashboardItem,\x20%s,\x20%s','message','result','catch','moment','bluebird'];(function(_0x214497,_0x3230ec){var _0x33ac04=function(_0x9fb854){while(--_0x9fb854){_0x214497['push'](_0x214497['shift']());}};_0x33ac04(++_0x3230ec);}(_0xc9e8,0x143));var _0x8c9e=function(_0x1f3aec,_0x24c18e){_0x1f3aec=_0x1f3aec-0x0;var _0x409f0d=_0xc9e8[_0x1f3aec];return _0x409f0d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x8c9e('0x0'));var BPromise=require(_0x8c9e('0x1'));var rs=require(_0x8c9e('0x2'));var fs=require('fs');var Redis=require(_0x8c9e('0x3'));var db=require(_0x8c9e('0x4'))['db'];var utils=require(_0x8c9e('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x8c9e('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x8c9e('0x7')][_0x8c9e('0x8')]({'port':0x232a});config[_0x8c9e('0x9')]=_[_0x8c9e('0xa')](config['redis'],{'host':_0x8c9e('0xb'),'port':0x18eb});var socket=require(_0x8c9e('0xc'))(new Redis(config[_0x8c9e('0x9')]));require('./dashboardItem.socket')[_0x8c9e('0xd')](socket);function respondWithRpcPromise(_0x2c1305,_0x50eefa,_0x203a2f){return new BPromise(function(_0xbbabf9,_0x557f9c){return client[_0x8c9e('0xe')](_0x2c1305,_0x203a2f)['then'](function(_0xd49f54){logger[_0x8c9e('0xf')]('DashboardItem,\x20%s,\x20%s',_0x50eefa,_0x8c9e('0x10'));logger[_0x8c9e('0x11')](_0x8c9e('0x12'),_0x50eefa,_0x8c9e('0x10'),JSON['stringify'](_0xd49f54));if(_0xd49f54[_0x8c9e('0x13')]){if(_0xd49f54[_0x8c9e('0x13')][_0x8c9e('0x14')]===0x1f4){logger['error'](_0x8c9e('0x15'),_0x50eefa,_0xd49f54['error']['message']);return _0x557f9c(_0xd49f54['error'][_0x8c9e('0x16')]);}logger[_0x8c9e('0x13')](_0x8c9e('0x15'),_0x50eefa,_0xd49f54['error'][_0x8c9e('0x16')]);return _0xbbabf9(_0xd49f54[_0x8c9e('0x13')]['message']);}else{logger[_0x8c9e('0xf')](_0x8c9e('0x15'),_0x50eefa,_0x8c9e('0x10'));_0xbbabf9(_0xd49f54[_0x8c9e('0x17')][_0x8c9e('0x16')]);}})[_0x8c9e('0x18')](function(_0x3c49ca){logger[_0x8c9e('0x13')](_0x8c9e('0x15'),_0x50eefa,_0x3c49ca);_0x557f9c(_0x3c49ca);});});}
\ No newline at end of file