Built motion from commit bab6f49e.|2.6.17
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index ee8f838..61640ec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf112=['message','request\x20sent','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','info','DashboardItem,\x20%s,\x20%s','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5f1617,_0x46277b){var _0x3af5da=function(_0x15b934){while(--_0x15b934){_0x5f1617['push'](_0x5f1617['shift']());}};_0x3af5da(++_0x46277b);}(_0xf112,0x170));var _0x2f11=function(_0x4883cb,_0x3df63c){_0x4883cb=_0x4883cb-0x0;var _0x33aad7=_0xf112[_0x4883cb];return _0x33aad7;};'use strict';var _=require('lodash');var util=require(_0x2f11('0x0'));var moment=require(_0x2f11('0x1'));var BPromise=require(_0x2f11('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2f11('0x3'));var db=require(_0x2f11('0x4'))['db'];var utils=require(_0x2f11('0x5'));var logger=require(_0x2f11('0x6'))('rpc');var config=require(_0x2f11('0x7'));var jayson=require(_0x2f11('0x8'));var client=jayson['client'][_0x2f11('0x9')]({'port':0x232a});config[_0x2f11('0xa')]=_[_0x2f11('0xb')](config[_0x2f11('0xa')],{'host':_0x2f11('0xc'),'port':0x18eb});var socket=require(_0x2f11('0xd'))(new Redis(config[_0x2f11('0xa')]));require(_0x2f11('0xe'))[_0x2f11('0xf')](socket);function respondWithRpcPromise(_0x48bb82,_0x286077,_0x54b92c){return new BPromise(function(_0x4da35a,_0x14e041){return client['request'](_0x48bb82,_0x54b92c)['then'](function(_0xac58b3){logger[_0x2f11('0x10')](_0x2f11('0x11'),_0x286077,'request\x20sent');logger['debug'](_0x2f11('0x12'),_0x286077,'request\x20sent',JSON[_0x2f11('0x13')](_0xac58b3));if(_0xac58b3[_0x2f11('0x14')]){if(_0xac58b3[_0x2f11('0x14')][_0x2f11('0x15')]===0x1f4){logger['error'](_0x2f11('0x11'),_0x286077,_0xac58b3[_0x2f11('0x14')][_0x2f11('0x16')]);return _0x14e041(_0xac58b3[_0x2f11('0x14')]['message']);}logger['error'](_0x2f11('0x11'),_0x286077,_0xac58b3[_0x2f11('0x14')]['message']);return _0x4da35a(_0xac58b3['error'][_0x2f11('0x16')]);}else{logger[_0x2f11('0x10')]('DashboardItem,\x20%s,\x20%s',_0x286077,_0x2f11('0x17'));_0x4da35a(_0xac58b3[_0x2f11('0x18')]['message']);}})[_0x2f11('0x19')](function(_0x5062f1){logger['error'](_0x2f11('0x11'),_0x286077,_0x5062f1);_0x14e041(_0x5062f1);});});}
\ No newline at end of file
+var _0xfc12=['debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','bluebird','randomstring','../../config/logger','rpc','jayson/promise','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent'];(function(_0x1c34e7,_0x33f9a8){var _0x378cb1=function(_0x10b5e3){while(--_0x10b5e3){_0x1c34e7['push'](_0x1c34e7['shift']());}};_0x378cb1(++_0x33f9a8);}(_0xfc12,0xd6));var _0x2fc1=function(_0x393915,_0x47ee58){_0x393915=_0x393915-0x0;var _0x192e4d=_0xfc12[_0x393915];return _0x192e4d;};'use strict';var _=require('lodash');var util=require(_0x2fc1('0x0'));var moment=require('moment');var BPromise=require(_0x2fc1('0x1'));var rs=require(_0x2fc1('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2fc1('0x3'))(_0x2fc1('0x4'));var config=require('../../config/environment');var jayson=require(_0x2fc1('0x5'));var client=jayson['client']['http']({'port':0x232a});config[_0x2fc1('0x6')]=_[_0x2fc1('0x7')](config['redis'],{'host':_0x2fc1('0x8'),'port':0x18eb});var socket=require(_0x2fc1('0x9'))(new Redis(config['redis']));require(_0x2fc1('0xa'))['register'](socket);function respondWithRpcPromise(_0x18c1a7,_0x579644,_0x45928a){return new BPromise(function(_0x2b9c19,_0x83d6fc){return client[_0x2fc1('0xb')](_0x18c1a7,_0x45928a)[_0x2fc1('0xc')](function(_0x48fd09){logger[_0x2fc1('0xd')](_0x2fc1('0xe'),_0x579644,_0x2fc1('0xf'));logger[_0x2fc1('0x10')](_0x2fc1('0x11'),_0x579644,'request\x20sent',JSON[_0x2fc1('0x12')](_0x48fd09));if(_0x48fd09[_0x2fc1('0x13')]){if(_0x48fd09['error'][_0x2fc1('0x14')]===0x1f4){logger[_0x2fc1('0x13')]('DashboardItem,\x20%s,\x20%s',_0x579644,_0x48fd09[_0x2fc1('0x13')][_0x2fc1('0x15')]);return _0x83d6fc(_0x48fd09[_0x2fc1('0x13')][_0x2fc1('0x15')]);}logger[_0x2fc1('0x13')](_0x2fc1('0xe'),_0x579644,_0x48fd09[_0x2fc1('0x13')][_0x2fc1('0x15')]);return _0x2b9c19(_0x48fd09[_0x2fc1('0x13')]['message']);}else{logger[_0x2fc1('0xd')](_0x2fc1('0xe'),_0x579644,'request\x20sent');_0x2b9c19(_0x48fd09['result']['message']);}})[_0x2fc1('0x16')](function(_0x34fc79){logger[_0x2fc1('0x13')](_0x2fc1('0xe'),_0x579644,_0x34fc79);_0x83d6fc(_0x34fc79);});});}
\ No newline at end of file