Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / userNotification / userNotification.rpc.js
index f708635..82f0492 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbd0e=['catch','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','http','defaults','redis','./userNotification.socket','register','request','then','UserNotification,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x18f516,_0x5c154a){var _0x35f825=function(_0x1e8176){while(--_0x1e8176){_0x18f516['push'](_0x18f516['shift']());}};_0x35f825(++_0x5c154a);}(_0xbd0e,0xf3));var _0xebd0=function(_0x2b7fd3,_0x17556d){_0x2b7fd3=_0x2b7fd3-0x0;var _0x1bd260=_0xbd0e[_0x2b7fd3];return _0x1bd260;};'use strict';var _=require(_0xebd0('0x0'));var util=require(_0xebd0('0x1'));var moment=require(_0xebd0('0x2'));var BPromise=require(_0xebd0('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xebd0('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xebd0('0x5'));var logger=require('../../config/logger')(_0xebd0('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xebd0('0x7')]({'port':0x232a});config['redis']=_[_0xebd0('0x8')](config[_0xebd0('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xebd0('0x9')]));require(_0xebd0('0xa'))[_0xebd0('0xb')](socket);function respondWithRpcPromise(_0x4c83b5,_0x265c9d,_0x17b7a3){return new BPromise(function(_0x456265,_0x4d0d36){return client[_0xebd0('0xc')](_0x4c83b5,_0x17b7a3)[_0xebd0('0xd')](function(_0x4e9b7c){logger['info'](_0xebd0('0xe'),_0x265c9d,_0xebd0('0xf'));logger['debug']('UserNotification,\x20%s,\x20%s,\x20%s',_0x265c9d,_0xebd0('0xf'),JSON[_0xebd0('0x10')](_0x4e9b7c));if(_0x4e9b7c[_0xebd0('0x11')]){if(_0x4e9b7c[_0xebd0('0x11')][_0xebd0('0x12')]===0x1f4){logger['error'](_0xebd0('0xe'),_0x265c9d,_0x4e9b7c[_0xebd0('0x11')][_0xebd0('0x13')]);return _0x4d0d36(_0x4e9b7c['error'][_0xebd0('0x13')]);}logger[_0xebd0('0x11')](_0xebd0('0xe'),_0x265c9d,_0x4e9b7c[_0xebd0('0x11')][_0xebd0('0x13')]);return _0x456265(_0x4e9b7c['error'][_0xebd0('0x13')]);}else{logger['info']('UserNotification,\x20%s,\x20%s',_0x265c9d,_0xebd0('0xf'));_0x456265(_0x4e9b7c[_0xebd0('0x14')]['message']);}})[_0xebd0('0x15')](function(_0x4b31f9){logger[_0xebd0('0x11')](_0xebd0('0xe'),_0x265c9d,_0x4b31f9);_0x4d0d36(_0x4b31f9);});});}
\ No newline at end of file
+var _0x770b=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','register','request','then','info','UserNotification,\x20%s,\x20%s','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/environment'];(function(_0x179c4a,_0x10eb06){var _0x5d1879=function(_0x1f1dcd){while(--_0x1f1dcd){_0x179c4a['push'](_0x179c4a['shift']());}};_0x5d1879(++_0x10eb06);}(_0x770b,0x123));var _0xb770=function(_0x479372,_0x1bb4d3){_0x479372=_0x479372-0x0;var _0x3a9b00=_0x770b[_0x479372];return _0x3a9b00;};'use strict';var _=require('lodash');var util=require(_0xb770('0x0'));var moment=require(_0xb770('0x1'));var BPromise=require(_0xb770('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb770('0x3'))['db'];var utils=require(_0xb770('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xb770('0x5'));var jayson=require(_0xb770('0x6'));var client=jayson[_0xb770('0x7')][_0xb770('0x8')]({'port':0x232a});config[_0xb770('0x9')]=_[_0xb770('0xa')](config['redis'],{'host':_0xb770('0xb'),'port':0x18eb});var socket=require(_0xb770('0xc'))(new Redis(config[_0xb770('0x9')]));require(_0xb770('0xd'))[_0xb770('0xe')](socket);function respondWithRpcPromise(_0x26a1c4,_0x28491f,_0x2cf49e){return new BPromise(function(_0x2cbe2c,_0x44ebe3){return client[_0xb770('0xf')](_0x26a1c4,_0x2cf49e)[_0xb770('0x10')](function(_0x4300e7){logger[_0xb770('0x11')](_0xb770('0x12'),_0x28491f,_0xb770('0x13'));logger[_0xb770('0x14')](_0xb770('0x15'),_0x28491f,_0xb770('0x13'),JSON[_0xb770('0x16')](_0x4300e7));if(_0x4300e7[_0xb770('0x17')]){if(_0x4300e7[_0xb770('0x17')]['code']===0x1f4){logger[_0xb770('0x17')]('UserNotification,\x20%s,\x20%s',_0x28491f,_0x4300e7[_0xb770('0x17')][_0xb770('0x18')]);return _0x44ebe3(_0x4300e7[_0xb770('0x17')][_0xb770('0x18')]);}logger[_0xb770('0x17')](_0xb770('0x12'),_0x28491f,_0x4300e7['error'][_0xb770('0x18')]);return _0x2cbe2c(_0x4300e7['error'][_0xb770('0x18')]);}else{logger['info']('UserNotification,\x20%s,\x20%s',_0x28491f,_0xb770('0x13'));_0x2cbe2c(_0x4300e7[_0xb770('0x19')][_0xb770('0x18')]);}})[_0xb770('0x1a')](function(_0xac0d6){logger[_0xb770('0x17')](_0xb770('0x12'),_0x28491f,_0xac0d6);_0x44ebe3(_0xac0d6);});});}
\ No newline at end of file