Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / userWhatsappQueue / userWhatsappQueue.rpc.js
index efa1809..bc2cee2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x1309=['result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','UserWhatsappQueue,\x20%s,\x20%s','message'];(function(_0x32f37c,_0x286c12){var _0x1c54bf=function(_0xce9178){while(--_0xce9178){_0x32f37c['push'](_0x32f37c['shift']());}};_0x1c54bf(++_0x286c12);}(_0x1309,0xf2));var _0x9130=function(_0x49b54b,_0x4fcd85){_0x49b54b=_0x49b54b-0x0;var _0x4abe47=_0x1309[_0x49b54b];return _0x4abe47;};'use strict';var _=require(_0x9130('0x0'));var util=require(_0x9130('0x1'));var moment=require(_0x9130('0x2'));var BPromise=require(_0x9130('0x3'));var rs=require(_0x9130('0x4'));var fs=require('fs');var Redis=require(_0x9130('0x5'));var db=require(_0x9130('0x6'))['db'];var utils=require(_0x9130('0x7'));var logger=require(_0x9130('0x8'))(_0x9130('0x9'));var config=require(_0x9130('0xa'));var jayson=require(_0x9130('0xb'));var client=jayson[_0x9130('0xc')][_0x9130('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3c6915,_0xffd638,_0x179e16){return new BPromise(function(_0x53b081,_0x3a0deb){return client['request'](_0x3c6915,_0x179e16)['then'](function(_0x1dfaf3){logger['info']('UserWhatsappQueue,\x20%s,\x20%s',_0xffd638,'request\x20sent');logger[_0x9130('0xe')](_0x9130('0xf'),_0xffd638,_0x9130('0x10'),JSON[_0x9130('0x11')](_0x1dfaf3));if(_0x1dfaf3[_0x9130('0x12')]){if(_0x1dfaf3['error'][_0x9130('0x13')]===0x1f4){logger['error'](_0x9130('0x14'),_0xffd638,_0x1dfaf3[_0x9130('0x12')]['message']);return _0x3a0deb(_0x1dfaf3[_0x9130('0x12')][_0x9130('0x15')]);}logger[_0x9130('0x12')](_0x9130('0x14'),_0xffd638,_0x1dfaf3['error'][_0x9130('0x15')]);return _0x53b081(_0x1dfaf3[_0x9130('0x12')]['message']);}else{logger['info'](_0x9130('0x14'),_0xffd638,_0x9130('0x10'));_0x53b081(_0x1dfaf3[_0x9130('0x16')]['message']);}})[_0x9130('0x17')](function(_0x4e842a){logger['error'](_0x9130('0x14'),_0xffd638,_0x4e842a);_0x3a0deb(_0x4e842a);});});}
\ No newline at end of file