Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / userMailQueue / userMailQueue.rpc.js
index 6033752..ac296f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a0f=['info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x47a400,_0x41c8ca){var _0x29e335=function(_0x3d3677){while(--_0x3d3677){_0x47a400['push'](_0x47a400['shift']());}};_0x29e335(++_0x41c8ca);}(_0x3a0f,0x145));var _0xf3a0=function(_0x590eca,_0x24c8d5){_0x590eca=_0x590eca-0x0;var _0x274f3=_0x3a0f[_0x590eca];return _0x274f3;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf3a0('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf3a0('0x1'));var db=require(_0xf3a0('0x2'))['db'];var utils=require(_0xf3a0('0x3'));var logger=require(_0xf3a0('0x4'))(_0xf3a0('0x5'));var config=require(_0xf3a0('0x6'));var jayson=require(_0xf3a0('0x7'));var client=jayson[_0xf3a0('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4736b7,_0x313b13,_0x3e550f){return new BPromise(function(_0xb2784d,_0x5d64bc){return client[_0xf3a0('0x9')](_0x4736b7,_0x3e550f)[_0xf3a0('0xa')](function(_0x214171){logger[_0xf3a0('0xb')](_0xf3a0('0xc'),_0x313b13,_0xf3a0('0xd'));logger[_0xf3a0('0xe')](_0xf3a0('0xf'),_0x313b13,'request\x20sent',JSON[_0xf3a0('0x10')](_0x214171));if(_0x214171[_0xf3a0('0x11')]){if(_0x214171[_0xf3a0('0x11')]['code']===0x1f4){logger[_0xf3a0('0x11')](_0xf3a0('0xc'),_0x313b13,_0x214171[_0xf3a0('0x11')]['message']);return _0x5d64bc(_0x214171['error'][_0xf3a0('0x12')]);}logger[_0xf3a0('0x11')](_0xf3a0('0xc'),_0x313b13,_0x214171[_0xf3a0('0x11')]['message']);return _0xb2784d(_0x214171[_0xf3a0('0x11')][_0xf3a0('0x12')]);}else{logger[_0xf3a0('0xb')](_0xf3a0('0xc'),_0x313b13,_0xf3a0('0xd'));_0xb2784d(_0x214171[_0xf3a0('0x13')][_0xf3a0('0x12')]);}})[_0xf3a0('0x14')](function(_0x59061a){logger['error'](_0xf3a0('0xc'),_0x313b13,_0x59061a);_0x5d64bc(_0x59061a);});});}
\ No newline at end of file
+var _0x5fc3=['../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','UserMailQueue,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x50c554,_0x27d4fe){var _0x1f424c=function(_0xe575c8){while(--_0xe575c8){_0x50c554['push'](_0x50c554['shift']());}};_0x1f424c(++_0x27d4fe);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5ac84c,_0x287781){_0x5ac84c=_0x5ac84c-0x0;var _0x3c53d2=_0x5fc3[_0x5ac84c];return _0x3c53d2;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('UserMailQueue,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('UserMailQueue,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('UserMailQueue,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}
\ No newline at end of file