Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / userWhatsappQueue / userWhatsappQueue.rpc.js
index 6dba386..082c73c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb3c4=['request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','then','info','UserWhatsappQueue,\x20%s,\x20%s'];(function(_0x5bbdeb,_0x5b6172){var _0x969b83=function(_0x551865){while(--_0x551865){_0x5bbdeb['push'](_0x5bbdeb['shift']());}};_0x969b83(++_0x5b6172);}(_0xb3c4,0x1ab));var _0x4b3c=function(_0x294f4d,_0x35032d){_0x294f4d=_0x294f4d-0x0;var _0x3519ce=_0xb3c4[_0x294f4d];return _0x3519ce;};'use strict';var _=require(_0x4b3c('0x0'));var util=require('util');var moment=require(_0x4b3c('0x1'));var BPromise=require(_0x4b3c('0x2'));var rs=require(_0x4b3c('0x3'));var fs=require('fs');var Redis=require(_0x4b3c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4b3c('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x4b3c('0x6'));var jayson=require(_0x4b3c('0x7'));var client=jayson[_0x4b3c('0x8')][_0x4b3c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2d0cce,_0x10c3d3,_0x6a6c93){return new BPromise(function(_0x3b6760,_0x39a42e){return client['request'](_0x2d0cce,_0x6a6c93)[_0x4b3c('0xa')](function(_0xd821e9){logger[_0x4b3c('0xb')](_0x4b3c('0xc'),_0x10c3d3,_0x4b3c('0xd'));logger[_0x4b3c('0xe')](_0x4b3c('0xf'),_0x10c3d3,_0x4b3c('0xd'),JSON[_0x4b3c('0x10')](_0xd821e9));if(_0xd821e9[_0x4b3c('0x11')]){if(_0xd821e9[_0x4b3c('0x11')][_0x4b3c('0x12')]===0x1f4){logger[_0x4b3c('0x11')](_0x4b3c('0xc'),_0x10c3d3,_0xd821e9[_0x4b3c('0x11')][_0x4b3c('0x13')]);return _0x39a42e(_0xd821e9[_0x4b3c('0x11')][_0x4b3c('0x13')]);}logger[_0x4b3c('0x11')](_0x4b3c('0xc'),_0x10c3d3,_0xd821e9[_0x4b3c('0x11')]['message']);return _0x3b6760(_0xd821e9[_0x4b3c('0x11')][_0x4b3c('0x13')]);}else{logger[_0x4b3c('0xb')](_0x4b3c('0xc'),_0x10c3d3,'request\x20sent');_0x3b6760(_0xd821e9[_0x4b3c('0x14')]['message']);}})[_0x4b3c('0x15')](function(_0x6e0716){logger[_0x4b3c('0x11')](_0x4b3c('0xc'),_0x10c3d3,_0x6e0716);_0x39a42e(_0x6e0716);});});}
\ No newline at end of file
+var _0xb8c0=['ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','then','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','util','moment','bluebird','randomstring'];(function(_0x52efb6,_0x4a67dc){var _0x4886b1=function(_0x395ea7){while(--_0x395ea7){_0x52efb6['push'](_0x52efb6['shift']());}};_0x4886b1(++_0x4a67dc);}(_0xb8c0,0x74));var _0x0b8c=function(_0x4215bd,_0x436b57){_0x4215bd=_0x4215bd-0x0;var _0x212ac9=_0xb8c0[_0x4215bd];return _0x212ac9;};'use strict';var _=require('lodash');var util=require(_0x0b8c('0x0'));var moment=require(_0x0b8c('0x1'));var BPromise=require(_0x0b8c('0x2'));var rs=require(_0x0b8c('0x3'));var fs=require('fs');var Redis=require(_0x0b8c('0x4'));var db=require(_0x0b8c('0x5'))['db'];var utils=require(_0x0b8c('0x6'));var logger=require(_0x0b8c('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0b8c('0x8')][_0x0b8c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x462978,_0x1d4c3b,_0x116189){return new BPromise(function(_0x589951,_0x5150a9){return client['request'](_0x462978,_0x116189)[_0x0b8c('0xa')](function(_0xbd4e95){logger['info'](_0x0b8c('0xb'),_0x1d4c3b,_0x0b8c('0xc'));logger[_0x0b8c('0xd')]('UserWhatsappQueue,\x20%s,\x20%s,\x20%s',_0x1d4c3b,_0x0b8c('0xc'),JSON[_0x0b8c('0xe')](_0xbd4e95));if(_0xbd4e95['error']){if(_0xbd4e95[_0x0b8c('0xf')][_0x0b8c('0x10')]===0x1f4){logger[_0x0b8c('0xf')](_0x0b8c('0xb'),_0x1d4c3b,_0xbd4e95[_0x0b8c('0xf')][_0x0b8c('0x11')]);return _0x5150a9(_0xbd4e95[_0x0b8c('0xf')][_0x0b8c('0x11')]);}logger['error'](_0x0b8c('0xb'),_0x1d4c3b,_0xbd4e95[_0x0b8c('0xf')][_0x0b8c('0x11')]);return _0x589951(_0xbd4e95[_0x0b8c('0xf')]['message']);}else{logger[_0x0b8c('0x12')](_0x0b8c('0xb'),_0x1d4c3b,_0x0b8c('0xc'));_0x589951(_0xbd4e95[_0x0b8c('0x13')]['message']);}})['catch'](function(_0x16da54){logger['error']('UserWhatsappQueue,\x20%s,\x20%s',_0x1d4c3b,_0x16da54);_0x5150a9(_0x16da54);});});}
\ No newline at end of file