Built motion from commit (unavailable).|2.5.9
[motion2.git] / server / api / notification / notification.rpc.js
index 087bf98..163eeac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x02f1=['stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./notification.socket','register','then','info','Notification,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1ebc6c,_0x58a00b){var _0x3a826d=function(_0x27d7eb){while(--_0x27d7eb){_0x1ebc6c['push'](_0x1ebc6c['shift']());}};_0x3a826d(++_0x58a00b);}(_0x02f1,0x172));var _0x102f=function(_0x16c8f0,_0x3b5bc2){_0x16c8f0=_0x16c8f0-0x0;var _0x314930=_0x02f1[_0x16c8f0];return _0x314930;};'use strict';var _=require(_0x102f('0x0'));var util=require('util');var moment=require(_0x102f('0x1'));var BPromise=require(_0x102f('0x2'));var rs=require(_0x102f('0x3'));var fs=require('fs');var Redis=require(_0x102f('0x4'));var db=require(_0x102f('0x5'))['db'];var utils=require(_0x102f('0x6'));var logger=require(_0x102f('0x7'))('rpc');var config=require(_0x102f('0x8'));var jayson=require(_0x102f('0x9'));var client=jayson[_0x102f('0xa')][_0x102f('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0x102f('0xc')],{'host':_0x102f('0xd'),'port':0x18eb});var socket=require(_0x102f('0xe'))(new Redis(config['redis']));require(_0x102f('0xf'))[_0x102f('0x10')](socket);function respondWithRpcPromise(_0x3ae1bc,_0x2788dd,_0xecdef6){return new BPromise(function(_0x13d50d,_0x55848a){return client['request'](_0x3ae1bc,_0xecdef6)[_0x102f('0x11')](function(_0x2da36e){logger[_0x102f('0x12')](_0x102f('0x13'),_0x2788dd,_0x102f('0x14'));logger[_0x102f('0x15')]('Notification,\x20%s,\x20%s,\x20%s',_0x2788dd,_0x102f('0x14'),JSON[_0x102f('0x16')](_0x2da36e));if(_0x2da36e[_0x102f('0x17')]){if(_0x2da36e[_0x102f('0x17')][_0x102f('0x18')]===0x1f4){logger[_0x102f('0x17')]('Notification,\x20%s,\x20%s',_0x2788dd,_0x2da36e[_0x102f('0x17')][_0x102f('0x19')]);return _0x55848a(_0x2da36e[_0x102f('0x17')][_0x102f('0x19')]);}logger[_0x102f('0x17')]('Notification,\x20%s,\x20%s',_0x2788dd,_0x2da36e[_0x102f('0x17')]['message']);return _0x13d50d(_0x2da36e[_0x102f('0x17')]['message']);}else{logger[_0x102f('0x12')](_0x102f('0x13'),_0x2788dd,_0x102f('0x14'));_0x13d50d(_0x2da36e[_0x102f('0x1a')][_0x102f('0x19')]);}})[_0x102f('0x1b')](function(_0x450475){logger[_0x102f('0x17')](_0x102f('0x13'),_0x2788dd,_0x450475);_0x55848a(_0x450475);});});}
\ No newline at end of file
+var _0xebc3=['client','redis','defaults','socket.io-emitter','register','then','info','Notification,\x20%s,\x20%s','request\x20sent','debug','Notification,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x171e9a,_0x3e9b42){var _0xdd9cc=function(_0x3b5fc1){while(--_0x3b5fc1){_0x171e9a['push'](_0x171e9a['shift']());}};_0xdd9cc(++_0x3e9b42);}(_0xebc3,0xd8));var _0x3ebc=function(_0x579d63,_0x54fd81){_0x579d63=_0x579d63-0x0;var _0x22d9ab=_0xebc3[_0x579d63];return _0x22d9ab;};'use strict';var _=require(_0x3ebc('0x0'));var util=require(_0x3ebc('0x1'));var moment=require('moment');var BPromise=require(_0x3ebc('0x2'));var rs=require(_0x3ebc('0x3'));var fs=require('fs');var Redis=require(_0x3ebc('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x3ebc('0x5'));var logger=require('../../config/logger')(_0x3ebc('0x6'));var config=require(_0x3ebc('0x7'));var jayson=require(_0x3ebc('0x8'));var client=jayson[_0x3ebc('0x9')]['http']({'port':0x232a});config[_0x3ebc('0xa')]=_[_0x3ebc('0xb')](config[_0x3ebc('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x3ebc('0xc'))(new Redis(config[_0x3ebc('0xa')]));require('./notification.socket')[_0x3ebc('0xd')](socket);function respondWithRpcPromise(_0x3429dc,_0x21106a,_0xa826b9){return new BPromise(function(_0x223dd8,_0x557da){return client['request'](_0x3429dc,_0xa826b9)[_0x3ebc('0xe')](function(_0x1ab016){logger[_0x3ebc('0xf')](_0x3ebc('0x10'),_0x21106a,_0x3ebc('0x11'));logger[_0x3ebc('0x12')](_0x3ebc('0x13'),_0x21106a,_0x3ebc('0x11'),JSON['stringify'](_0x1ab016));if(_0x1ab016[_0x3ebc('0x14')]){if(_0x1ab016[_0x3ebc('0x14')][_0x3ebc('0x15')]===0x1f4){logger['error'](_0x3ebc('0x10'),_0x21106a,_0x1ab016[_0x3ebc('0x14')][_0x3ebc('0x16')]);return _0x557da(_0x1ab016['error']['message']);}logger['error'](_0x3ebc('0x10'),_0x21106a,_0x1ab016[_0x3ebc('0x14')][_0x3ebc('0x16')]);return _0x223dd8(_0x1ab016['error'][_0x3ebc('0x16')]);}else{logger['info']('Notification,\x20%s,\x20%s',_0x21106a,'request\x20sent');_0x223dd8(_0x1ab016[_0x3ebc('0x17')][_0x3ebc('0x16')]);}})[_0x3ebc('0x18')](function(_0x5442bc){logger[_0x3ebc('0x14')](_0x3ebc('0x10'),_0x21106a,_0x5442bc);_0x557da(_0x5442bc);});});}
\ No newline at end of file