Built motion from commit 994c64e1.|2.6.1
[motion2.git] / server / api / userFaxQueue / userFaxQueue.rpc.js
index 3fabcba..96e3800 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa96d=['UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','UserFaxQueue,\x20%s,\x20%s','request\x20sent'];(function(_0x54f1cb,_0x116be9){var _0x276906=function(_0x40527e){while(--_0x40527e){_0x54f1cb['push'](_0x54f1cb['shift']());}};_0x276906(++_0x116be9);}(_0xa96d,0x116));var _0xda96=function(_0xfff9cf,_0x55ad70){_0xfff9cf=_0xfff9cf-0x0;var _0x231718=_0xa96d[_0xfff9cf];return _0x231718;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xda96('0x0'));var fs=require('fs');var Redis=require(_0xda96('0x1'));var db=require(_0xda96('0x2'))['db'];var utils=require(_0xda96('0x3'));var logger=require(_0xda96('0x4'))(_0xda96('0x5'));var config=require(_0xda96('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xda96('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x478da9,_0x3199d0,_0x2ff9dd){return new BPromise(function(_0x3673b8,_0x3e0c6f){return client['request'](_0x478da9,_0x2ff9dd)[_0xda96('0x8')](function(_0x1c3e37){logger['info'](_0xda96('0x9'),_0x3199d0,_0xda96('0xa'));logger['debug'](_0xda96('0xb'),_0x3199d0,_0xda96('0xa'),JSON[_0xda96('0xc')](_0x1c3e37));if(_0x1c3e37['error']){if(_0x1c3e37[_0xda96('0xd')]['code']===0x1f4){logger[_0xda96('0xd')](_0xda96('0x9'),_0x3199d0,_0x1c3e37[_0xda96('0xd')][_0xda96('0xe')]);return _0x3e0c6f(_0x1c3e37[_0xda96('0xd')][_0xda96('0xe')]);}logger[_0xda96('0xd')](_0xda96('0x9'),_0x3199d0,_0x1c3e37[_0xda96('0xd')]['message']);return _0x3673b8(_0x1c3e37['error']['message']);}else{logger['info'](_0xda96('0x9'),_0x3199d0,_0xda96('0xa'));_0x3673b8(_0x1c3e37[_0xda96('0xf')][_0xda96('0xe')]);}})[_0xda96('0x10')](function(_0x2155b0){logger[_0xda96('0xd')](_0xda96('0x9'),_0x3199d0,_0x2155b0);_0x3e0c6f(_0x2155b0);});});}
\ No newline at end of file
+var _0x77e2=['ioredis','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','util','bluebird','randomstring'];(function(_0x4c40ef,_0x442a07){var _0x3780c9=function(_0x11bc0e){while(--_0x11bc0e){_0x4c40ef['push'](_0x4c40ef['shift']());}};_0x3780c9(++_0x442a07);}(_0x77e2,0xa8));var _0x277e=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x77e2[_0x321bb2];return _0x9c12ed;};'use strict';var _=require('lodash');var util=require(_0x277e('0x0'));var moment=require('moment');var BPromise=require(_0x277e('0x1'));var rs=require(_0x277e('0x2'));var fs=require('fs');var Redis=require(_0x277e('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x277e('0x4'))('rpc');var config=require(_0x277e('0x5'));var jayson=require(_0x277e('0x6'));var client=jayson[_0x277e('0x7')][_0x277e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x52cb32,_0x2370d1,_0x5d1b40){return new BPromise(function(_0x2ffdb5,_0x49db20){return client[_0x277e('0x9')](_0x52cb32,_0x5d1b40)['then'](function(_0x4b655b){logger[_0x277e('0xa')](_0x277e('0xb'),_0x2370d1,_0x277e('0xc'));logger[_0x277e('0xd')]('UserFaxQueue,\x20%s,\x20%s,\x20%s',_0x2370d1,_0x277e('0xc'),JSON['stringify'](_0x4b655b));if(_0x4b655b[_0x277e('0xe')]){if(_0x4b655b[_0x277e('0xe')][_0x277e('0xf')]===0x1f4){logger[_0x277e('0xe')](_0x277e('0xb'),_0x2370d1,_0x4b655b[_0x277e('0xe')]['message']);return _0x49db20(_0x4b655b['error'][_0x277e('0x10')]);}logger[_0x277e('0xe')]('UserFaxQueue,\x20%s,\x20%s',_0x2370d1,_0x4b655b['error']['message']);return _0x2ffdb5(_0x4b655b['error']['message']);}else{logger['info'](_0x277e('0xb'),_0x2370d1,'request\x20sent');_0x2ffdb5(_0x4b655b[_0x277e('0x11')][_0x277e('0x10')]);}})[_0x277e('0x12')](function(_0x5ca7c7){logger[_0x277e('0xe')](_0x277e('0xb'),_0x2370d1,_0x5ca7c7);_0x49db20(_0x5ca7c7);});});}
\ No newline at end of file