Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / userWhatsappQueue / userWhatsappQueue.rpc.js
index 536abe9..71f3082 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x411f=['jayson/promise','client','http','request','then','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x411f,0x118));var _0xf411=function(_0x21620c,_0x186151){_0x21620c=_0x21620c-0x0;var _0x2df6f=_0x411f[_0x21620c];return _0x2df6f;};'use strict';var _=require(_0xf411('0x0'));var util=require(_0xf411('0x1'));var moment=require(_0xf411('0x2'));var BPromise=require('bluebird');var rs=require(_0xf411('0x3'));var fs=require('fs');var Redis=require(_0xf411('0x4'));var db=require(_0xf411('0x5'))['db'];var utils=require(_0xf411('0x6'));var logger=require('../../config/logger')(_0xf411('0x7'));var config=require('../../config/environment');var jayson=require(_0xf411('0x8'));var client=jayson[_0xf411('0x9')][_0xf411('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa97e01,_0x2a01c9,_0x37945f){return new BPromise(function(_0x43ec86,_0x10d099){return client[_0xf411('0xb')](_0xa97e01,_0x37945f)[_0xf411('0xc')](function(_0x41b76f){logger[_0xf411('0xd')](_0xf411('0xe'),_0x2a01c9,_0xf411('0xf'));logger[_0xf411('0x10')](_0xf411('0x11'),_0x2a01c9,_0xf411('0xf'),JSON[_0xf411('0x12')](_0x41b76f));if(_0x41b76f[_0xf411('0x13')]){if(_0x41b76f[_0xf411('0x13')][_0xf411('0x14')]===0x1f4){logger['error']('UserWhatsappQueue,\x20%s,\x20%s',_0x2a01c9,_0x41b76f[_0xf411('0x13')][_0xf411('0x15')]);return _0x10d099(_0x41b76f[_0xf411('0x13')]['message']);}logger[_0xf411('0x13')](_0xf411('0xe'),_0x2a01c9,_0x41b76f[_0xf411('0x13')][_0xf411('0x15')]);return _0x43ec86(_0x41b76f[_0xf411('0x13')][_0xf411('0x15')]);}else{logger[_0xf411('0xd')]('UserWhatsappQueue,\x20%s,\x20%s',_0x2a01c9,_0xf411('0xf'));_0x43ec86(_0x41b76f[_0xf411('0x16')]['message']);}})[_0xf411('0x17')](function(_0x42f6cd){logger[_0xf411('0x13')](_0xf411('0xe'),_0x2a01c9,_0x42f6cd);_0x10d099(_0x42f6cd);});});}
\ No newline at end of file
+var _0x8148=['request','then','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0x8ba19a,_0x1d2b2b){var _0x2bd8b4=function(_0xee823f){while(--_0xee823f){_0x8ba19a['push'](_0x8ba19a['shift']());}};_0x2bd8b4(++_0x1d2b2b);}(_0x8148,0xba));var _0x8814=function(_0x266c55,_0x55197f){_0x266c55=_0x266c55-0x0;var _0x2557ec=_0x8148[_0x266c55];return _0x2557ec;};'use strict';var _=require(_0x8814('0x0'));var util=require(_0x8814('0x1'));var moment=require(_0x8814('0x2'));var BPromise=require(_0x8814('0x3'));var rs=require(_0x8814('0x4'));var fs=require('fs');var Redis=require(_0x8814('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8814('0x6'));var logger=require(_0x8814('0x7'))('rpc');var config=require(_0x8814('0x8'));var jayson=require(_0x8814('0x9'));var client=jayson[_0x8814('0xa')][_0x8814('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x14d8af,_0x27d24d,_0xa21710){return new BPromise(function(_0x38a1e7,_0xf90c56){return client[_0x8814('0xc')](_0x14d8af,_0xa21710)[_0x8814('0xd')](function(_0x6d31b3){logger[_0x8814('0xe')](_0x8814('0xf'),_0x27d24d,_0x8814('0x10'));logger['debug']('UserWhatsappQueue,\x20%s,\x20%s,\x20%s',_0x27d24d,_0x8814('0x10'),JSON[_0x8814('0x11')](_0x6d31b3));if(_0x6d31b3[_0x8814('0x12')]){if(_0x6d31b3['error']['code']===0x1f4){logger['error'](_0x8814('0xf'),_0x27d24d,_0x6d31b3['error'][_0x8814('0x13')]);return _0xf90c56(_0x6d31b3[_0x8814('0x12')]['message']);}logger['error'](_0x8814('0xf'),_0x27d24d,_0x6d31b3[_0x8814('0x12')][_0x8814('0x13')]);return _0x38a1e7(_0x6d31b3['error']['message']);}else{logger['info']('UserWhatsappQueue,\x20%s,\x20%s',_0x27d24d,_0x8814('0x10'));_0x38a1e7(_0x6d31b3[_0x8814('0x14')][_0x8814('0x13')]);}})[_0x8814('0x15')](function(_0x9d1f79){logger['error']('UserWhatsappQueue,\x20%s,\x20%s',_0x27d24d,_0x9d1f79);_0xf90c56(_0x9d1f79);});});}
\ No newline at end of file