Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / smsApplication / smsApplication.rpc.js
index 15fed20..8fb85ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6888=['../../config/utils','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','SmsApplication,\x20%s,\x20%s','info','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x247fab,_0x6d661){var _0x538c4d=function(_0x3efe0b){while(--_0x3efe0b){_0x247fab['push'](_0x247fab['shift']());}};_0x538c4d(++_0x6d661);}(_0x6888,0xd2));var _0x8688=function(_0xdea41a,_0x552987){_0xdea41a=_0xdea41a-0x0;var _0x15d0d8=_0x6888[_0xdea41a];return _0x15d0d8;};'use strict';var _=require(_0x8688('0x0'));var util=require('util');var moment=require(_0x8688('0x1'));var BPromise=require(_0x8688('0x2'));var rs=require(_0x8688('0x3'));var fs=require('fs');var Redis=require(_0x8688('0x4'));var db=require(_0x8688('0x5'))['db'];var utils=require(_0x8688('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x8688('0x7'));var jayson=require(_0x8688('0x8'));var client=jayson[_0x8688('0x9')][_0x8688('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xfa1a28,_0xcc92be,_0x5860a8){return new BPromise(function(_0x457991,_0x15f2b9){return client[_0x8688('0xb')](_0xfa1a28,_0x5860a8)[_0x8688('0xc')](function(_0x18723c){logger['info']('SmsApplication,\x20%s,\x20%s',_0xcc92be,_0x8688('0xd'));logger[_0x8688('0xe')](_0x8688('0xf'),_0xcc92be,_0x8688('0xd'),JSON[_0x8688('0x10')](_0x18723c));if(_0x18723c[_0x8688('0x11')]){if(_0x18723c[_0x8688('0x11')][_0x8688('0x12')]===0x1f4){logger[_0x8688('0x11')]('SmsApplication,\x20%s,\x20%s',_0xcc92be,_0x18723c[_0x8688('0x11')][_0x8688('0x13')]);return _0x15f2b9(_0x18723c[_0x8688('0x11')][_0x8688('0x13')]);}logger[_0x8688('0x11')](_0x8688('0x14'),_0xcc92be,_0x18723c[_0x8688('0x11')][_0x8688('0x13')]);return _0x457991(_0x18723c[_0x8688('0x11')][_0x8688('0x13')]);}else{logger[_0x8688('0x15')](_0x8688('0x14'),_0xcc92be,'request\x20sent');_0x457991(_0x18723c[_0x8688('0x16')][_0x8688('0x13')]);}})[_0x8688('0x17')](function(_0x5ef2e6){logger[_0x8688('0x11')](_0x8688('0x14'),_0xcc92be,_0x5ef2e6);_0x15f2b9(_0x5ef2e6);});});}
\ No newline at end of file
+var _0xac41=['stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','SmsApplication,\x20%s,\x20%s,\x20%s'];(function(_0x1269c6,_0x1c8942){var _0x4868c7=function(_0x1661bc){while(--_0x1661bc){_0x1269c6['push'](_0x1269c6['shift']());}};_0x4868c7(++_0x1c8942);}(_0xac41,0xdd));var _0x1ac4=function(_0x220a63,_0x3c68e2){_0x220a63=_0x220a63-0x0;var _0x2e5fae=_0xac41[_0x220a63];return _0x2e5fae;};'use strict';var _=require(_0x1ac4('0x0'));var util=require(_0x1ac4('0x1'));var moment=require(_0x1ac4('0x2'));var BPromise=require(_0x1ac4('0x3'));var rs=require(_0x1ac4('0x4'));var fs=require('fs');var Redis=require(_0x1ac4('0x5'));var db=require(_0x1ac4('0x6'))['db'];var utils=require(_0x1ac4('0x7'));var logger=require('../../config/logger')(_0x1ac4('0x8'));var config=require(_0x1ac4('0x9'));var jayson=require(_0x1ac4('0xa'));var client=jayson[_0x1ac4('0xb')][_0x1ac4('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2ad173,_0x18703d,_0x1c9bed){return new BPromise(function(_0x1c7e79,_0x245861){return client[_0x1ac4('0xd')](_0x2ad173,_0x1c9bed)[_0x1ac4('0xe')](function(_0x454972){logger[_0x1ac4('0xf')](_0x1ac4('0x10'),_0x18703d,_0x1ac4('0x11'));logger['debug'](_0x1ac4('0x12'),_0x18703d,'request\x20sent',JSON[_0x1ac4('0x13')](_0x454972));if(_0x454972[_0x1ac4('0x14')]){if(_0x454972['error'][_0x1ac4('0x15')]===0x1f4){logger[_0x1ac4('0x14')]('SmsApplication,\x20%s,\x20%s',_0x18703d,_0x454972[_0x1ac4('0x14')]['message']);return _0x245861(_0x454972['error']['message']);}logger[_0x1ac4('0x14')](_0x1ac4('0x10'),_0x18703d,_0x454972[_0x1ac4('0x14')][_0x1ac4('0x16')]);return _0x1c7e79(_0x454972[_0x1ac4('0x14')][_0x1ac4('0x16')]);}else{logger['info']('SmsApplication,\x20%s,\x20%s',_0x18703d,_0x1ac4('0x11'));_0x1c7e79(_0x454972[_0x1ac4('0x17')][_0x1ac4('0x16')]);}})['catch'](function(_0x477db7){logger[_0x1ac4('0x14')](_0x1ac4('0x10'),_0x18703d,_0x477db7);_0x245861(_0x477db7);});});}
\ No newline at end of file