Built motion from commit 511216ff.|2.6.34
[motion2.git] / server / api / userWhatsappQueue / userWhatsappQueue.rpc.js
index 8779012..6a718e2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab29=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird'];(function(_0x23c05f,_0x149b3a){var _0x232821=function(_0x4a1d48){while(--_0x4a1d48){_0x23c05f['push'](_0x23c05f['shift']());}};_0x232821(++_0x149b3a);}(_0xab29,0x11a));var _0x9ab2=function(_0x147dd1,_0x4f67d3){_0x147dd1=_0x147dd1-0x0;var _0x593952=_0xab29[_0x147dd1];return _0x593952;};'use strict';var _=require(_0x9ab2('0x0'));var util=require(_0x9ab2('0x1'));var moment=require(_0x9ab2('0x2'));var BPromise=require(_0x9ab2('0x3'));var rs=require(_0x9ab2('0x4'));var fs=require('fs');var Redis=require(_0x9ab2('0x5'));var db=require(_0x9ab2('0x6'))['db'];var utils=require(_0x9ab2('0x7'));var logger=require(_0x9ab2('0x8'))(_0x9ab2('0x9'));var config=require(_0x9ab2('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x9ab2('0xb')][_0x9ab2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x160312,_0x2278ed,_0x2daa80){return new BPromise(function(_0x1d2a4d,_0x34d794){return client[_0x9ab2('0xd')](_0x160312,_0x2daa80)[_0x9ab2('0xe')](function(_0x820ffe){logger['info'](_0x9ab2('0xf'),_0x2278ed,_0x9ab2('0x10'));logger[_0x9ab2('0x11')](_0x9ab2('0x12'),_0x2278ed,_0x9ab2('0x10'),JSON[_0x9ab2('0x13')](_0x820ffe));if(_0x820ffe[_0x9ab2('0x14')]){if(_0x820ffe['error'][_0x9ab2('0x15')]===0x1f4){logger['error']('UserWhatsappQueue,\x20%s,\x20%s',_0x2278ed,_0x820ffe['error']['message']);return _0x34d794(_0x820ffe[_0x9ab2('0x14')][_0x9ab2('0x16')]);}logger['error'](_0x9ab2('0xf'),_0x2278ed,_0x820ffe[_0x9ab2('0x14')][_0x9ab2('0x16')]);return _0x1d2a4d(_0x820ffe[_0x9ab2('0x14')][_0x9ab2('0x16')]);}else{logger[_0x9ab2('0x17')](_0x9ab2('0xf'),_0x2278ed,'request\x20sent');_0x1d2a4d(_0x820ffe[_0x9ab2('0x18')][_0x9ab2('0x16')]);}})[_0x9ab2('0x19')](function(_0x4f367e){logger[_0x9ab2('0x14')](_0x9ab2('0xf'),_0x2278ed,_0x4f367e);_0x34d794(_0x4f367e);});});}
\ No newline at end of file
+var _0x15cf=['error','message','UserWhatsappQueue,\x20%s,\x20%s','info','result','catch','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','request\x20sent','stringify'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x15cf,0xd2));var _0xf15c=function(_0x32d414,_0x4d23da){_0x32d414=_0x32d414-0x0;var _0x4e0bca=_0x15cf[_0x32d414];return _0x4e0bca;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf15c('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf15c('0x1'));var db=require(_0xf15c('0x2'))['db'];var utils=require(_0xf15c('0x3'));var logger=require(_0xf15c('0x4'))('rpc');var config=require(_0xf15c('0x5'));var jayson=require(_0xf15c('0x6'));var client=jayson['client'][_0xf15c('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1302e3,_0xbe39e4,_0x458a16){return new BPromise(function(_0x396909,_0x3116c1){return client[_0xf15c('0x8')](_0x1302e3,_0x458a16)['then'](function(_0x5a0801){logger['info']('UserWhatsappQueue,\x20%s,\x20%s',_0xbe39e4,'request\x20sent');logger['debug']('UserWhatsappQueue,\x20%s,\x20%s,\x20%s',_0xbe39e4,_0xf15c('0x9'),JSON[_0xf15c('0xa')](_0x5a0801));if(_0x5a0801[_0xf15c('0xb')]){if(_0x5a0801['error']['code']===0x1f4){logger[_0xf15c('0xb')]('UserWhatsappQueue,\x20%s,\x20%s',_0xbe39e4,_0x5a0801[_0xf15c('0xb')][_0xf15c('0xc')]);return _0x3116c1(_0x5a0801[_0xf15c('0xb')][_0xf15c('0xc')]);}logger[_0xf15c('0xb')](_0xf15c('0xd'),_0xbe39e4,_0x5a0801[_0xf15c('0xb')]['message']);return _0x396909(_0x5a0801[_0xf15c('0xb')][_0xf15c('0xc')]);}else{logger[_0xf15c('0xe')]('UserWhatsappQueue,\x20%s,\x20%s',_0xbe39e4,_0xf15c('0x9'));_0x396909(_0x5a0801[_0xf15c('0xf')][_0xf15c('0xc')]);}})[_0xf15c('0x10')](function(_0xe51add){logger[_0xf15c('0xb')](_0xf15c('0xd'),_0xbe39e4,_0xe51add);_0x3116c1(_0xe51add);});});}
\ No newline at end of file