Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / userWhatsappQueue / userWhatsappQueue.rpc.js
index e4470e5..efa1809 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9999=['result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','code','error','message'];(function(_0x20be9f,_0x4e3110){var _0x53581a=function(_0x4b628b){while(--_0x4b628b){_0x20be9f['push'](_0x20be9f['shift']());}};_0x53581a(++_0x4e3110);}(_0x9999,0x16b));var _0x9999=function(_0x51b917,_0x3f31bd){_0x51b917=_0x51b917-0x0;var _0x334616=_0x9999[_0x51b917];return _0x334616;};'use strict';var _=require('lodash');var util=require(_0x9999('0x0'));var moment=require(_0x9999('0x1'));var BPromise=require(_0x9999('0x2'));var rs=require(_0x9999('0x3'));var fs=require('fs');var Redis=require(_0x9999('0x4'));var db=require(_0x9999('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9999('0x6'));var config=require(_0x9999('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9999('0x8')][_0x9999('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xa01c3,_0x14ab30,_0x15a6bd){return new BPromise(function(_0x29db08,_0x21b74a){return client['request'](_0xa01c3,_0x15a6bd)['then'](function(_0x2d587f){logger[_0x9999('0xa')](_0x9999('0xb'),_0x14ab30,_0x9999('0xc'));logger[_0x9999('0xd')]('UserWhatsappQueue,\x20%s,\x20%s,\x20%s',_0x14ab30,'request\x20sent',JSON['stringify'](_0x2d587f));if(_0x2d587f['error']){if(_0x2d587f['error'][_0x9999('0xe')]===0x1f4){logger['error']('UserWhatsappQueue,\x20%s,\x20%s',_0x14ab30,_0x2d587f[_0x9999('0xf')][_0x9999('0x10')]);return _0x21b74a(_0x2d587f['error'][_0x9999('0x10')]);}logger[_0x9999('0xf')](_0x9999('0xb'),_0x14ab30,_0x2d587f[_0x9999('0xf')][_0x9999('0x10')]);return _0x29db08(_0x2d587f[_0x9999('0xf')][_0x9999('0x10')]);}else{logger[_0x9999('0xa')]('UserWhatsappQueue,\x20%s,\x20%s',_0x14ab30,_0x9999('0xc'));_0x29db08(_0x2d587f[_0x9999('0x11')][_0x9999('0x10')]);}})[_0x9999('0x12')](function(_0x22f9c4){logger[_0x9999('0xf')](_0x9999('0xb'),_0x14ab30,_0x22f9c4);_0x21b74a(_0x22f9c4);});});}
\ No newline at end of file
+var _0x5f60=['UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','info'];(function(_0x303bfc,_0x30a8ca){var _0x5cff92=function(_0x5b30b3){while(--_0x5b30b3){_0x303bfc['push'](_0x303bfc['shift']());}};_0x5cff92(++_0x30a8ca);}(_0x5f60,0x144));var _0x05f6=function(_0x44feb5,_0x3f7964){_0x44feb5=_0x44feb5-0x0;var _0x45e3b8=_0x5f60[_0x44feb5];return _0x45e3b8;};'use strict';var _=require(_0x05f6('0x0'));var util=require(_0x05f6('0x1'));var moment=require(_0x05f6('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x05f6('0x3'));var db=require(_0x05f6('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x05f6('0x5'))(_0x05f6('0x6'));var config=require(_0x05f6('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x05f6('0x8')][_0x05f6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x95b6d8,_0x28386c,_0x3f53ff){return new BPromise(function(_0xada4ab,_0x3796e4){return client[_0x05f6('0xa')](_0x95b6d8,_0x3f53ff)['then'](function(_0x1f83d7){logger[_0x05f6('0xb')](_0x05f6('0xc'),_0x28386c,_0x05f6('0xd'));logger[_0x05f6('0xe')](_0x05f6('0xf'),_0x28386c,'request\x20sent',JSON[_0x05f6('0x10')](_0x1f83d7));if(_0x1f83d7[_0x05f6('0x11')]){if(_0x1f83d7[_0x05f6('0x11')]['code']===0x1f4){logger[_0x05f6('0x11')](_0x05f6('0xc'),_0x28386c,_0x1f83d7['error'][_0x05f6('0x12')]);return _0x3796e4(_0x1f83d7['error'][_0x05f6('0x12')]);}logger['error'](_0x05f6('0xc'),_0x28386c,_0x1f83d7[_0x05f6('0x11')][_0x05f6('0x12')]);return _0xada4ab(_0x1f83d7[_0x05f6('0x11')][_0x05f6('0x12')]);}else{logger[_0x05f6('0xb')](_0x05f6('0xc'),_0x28386c,_0x05f6('0xd'));_0xada4ab(_0x1f83d7[_0x05f6('0x13')][_0x05f6('0x12')]);}})[_0x05f6('0x14')](function(_0x381af9){logger['error'](_0x05f6('0xc'),_0x28386c,_0x381af9);_0x3796e4(_0x381af9);});});}
\ No newline at end of file