Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index 7e952b6..f1605f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e3f=['../../config/environment','client','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','COUNT','sequelize','literal','outboundQueuePauses','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x1a0c87,_0x348d55){var _0x3c4042=function(_0x393660){while(--_0x393660){_0x1a0c87['push'](_0x1a0c87['shift']());}};_0x3c4042(++_0x348d55);}(_0x8e3f,0x13d));var _0xf8e3=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x8e3f[_0x40a045];return _0x1a687c;};'use strict';var _=require(_0xf8e3('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf8e3('0x1'));var rs=require(_0xf8e3('0x2'));var fs=require('fs');var Redis=require(_0xf8e3('0x3'));var db=require(_0xf8e3('0x4'))['db'];var utils=require(_0xf8e3('0x5'));var logger=require('../../config/logger')(_0xf8e3('0x6'));var config=require(_0xf8e3('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf8e3('0x8')]['http']({'port':0x232a});config[_0xf8e3('0x9')]=_[_0xf8e3('0xa')](config[_0xf8e3('0x9')],{'host':_0xf8e3('0xb'),'port':0x18eb});var socket=require(_0xf8e3('0xc'))(new Redis(config[_0xf8e3('0x9')]));require(_0xf8e3('0xd'))[_0xf8e3('0xe')](socket);function respondWithRpcPromise(_0x135132,_0x147142,_0x357e89){return new BPromise(function(_0xeca05a,_0x4da462){return client[_0xf8e3('0xf')](_0x135132,_0x357e89)[_0xf8e3('0x10')](function(_0x4e49c1){logger['info'](_0xf8e3('0x11'),_0x147142,_0xf8e3('0x12'));logger[_0xf8e3('0x13')](_0xf8e3('0x14'),_0x147142,_0xf8e3('0x12'),JSON[_0xf8e3('0x15')](_0x4e49c1));if(_0x4e49c1[_0xf8e3('0x16')]){if(_0x4e49c1[_0xf8e3('0x16')]['code']===0x1f4){logger[_0xf8e3('0x16')](_0xf8e3('0x11'),_0x147142,_0x4e49c1['error'][_0xf8e3('0x17')]);return _0x4da462(_0x4e49c1[_0xf8e3('0x16')][_0xf8e3('0x17')]);}logger[_0xf8e3('0x16')](_0xf8e3('0x11'),_0x147142,_0x4e49c1[_0xf8e3('0x16')]['message']);return _0xeca05a(_0x4e49c1[_0xf8e3('0x16')][_0xf8e3('0x17')]);}else{logger[_0xf8e3('0x18')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x147142,'request\x20sent');_0xeca05a(_0x4e49c1['result'][_0xf8e3('0x17')]);}})[_0xf8e3('0x19')](function(_0x10ec9b){logger['error'](_0xf8e3('0x11'),_0x147142,_0x10ec9b);_0x4da462(_0x10ec9b);});});}exports[_0xf8e3('0x1a')]=function(_0x3ed15f){var _0x4cf7d2=this;return new Promise(function(_0xaec880,_0x7802c2){return db[_0xf8e3('0x1b')][_0xf8e3('0x1c')]({'raw':_0x3ed15f[_0xf8e3('0x1d')]?_0x3ed15f['options'][_0xf8e3('0x1e')]===undefined?!![]:![]:!![],'where':_0x3ed15f['options']?_0x3ed15f[_0xf8e3('0x1d')][_0xf8e3('0x1f')]||null:null,'attributes':[[db['sequelize']['fn'](_0xf8e3('0x20'),db[_0xf8e3('0x21')]['fn']('IF',db[_0xf8e3('0x21')][_0xf8e3('0x22')]('`paused`\x20=\x201,\x201,\x20null'))),_0xf8e3('0x23')]]})[_0xf8e3('0x10')](function(_0x191895){logger[_0xf8e3('0x18')]('GetVoiceQueueRtPauses',_0x3ed15f);logger[_0xf8e3('0x13')](_0xf8e3('0x1a'),_0x3ed15f,JSON['stringify'](_0x191895));_0xaec880(_0x191895);})[_0xf8e3('0x19')](function(_0x1f2eb7){logger[_0xf8e3('0x16')]('GetVoiceQueueRtPauses',_0x1f2eb7[_0xf8e3('0x17')],_0x3ed15f);_0x7802c2(_0x4cf7d2[_0xf8e3('0x16')](0x1f4,_0x1f2eb7[_0xf8e3('0x17')]));});});};
\ No newline at end of file
+var _0xf737=['debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','lodash','util','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','./userVoiceQueueRt.socket','register','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent'];(function(_0x206a5e,_0x94b066){var _0x590851=function(_0x37a3ee){while(--_0x37a3ee){_0x206a5e['push'](_0x206a5e['shift']());}};_0x590851(++_0x94b066);}(_0xf737,0x178));var _0x7f73=function(_0x2c4a91,_0x512934){_0x2c4a91=_0x2c4a91-0x0;var _0x5d0ade=_0xf737[_0x2c4a91];return _0x5d0ade;};'use strict';var _=require(_0x7f73('0x0'));var util=require(_0x7f73('0x1'));var moment=require(_0x7f73('0x2'));var BPromise=require('bluebird');var rs=require(_0x7f73('0x3'));var fs=require('fs');var Redis=require(_0x7f73('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x7f73('0x5'));var logger=require('../../config/logger')(_0x7f73('0x6'));var config=require(_0x7f73('0x7'));var jayson=require(_0x7f73('0x8'));var client=jayson[_0x7f73('0x9')][_0x7f73('0xa')]({'port':0x232a});config[_0x7f73('0xb')]=_[_0x7f73('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7f73('0xb')]));require(_0x7f73('0xd'))[_0x7f73('0xe')](socket);function respondWithRpcPromise(_0x4a751a,_0x95285b,_0x55f960){return new BPromise(function(_0x1c96d1,_0x336847){return client[_0x7f73('0xf')](_0x4a751a,_0x55f960)[_0x7f73('0x10')](function(_0x567f33){logger[_0x7f73('0x11')](_0x7f73('0x12'),_0x95285b,_0x7f73('0x13'));logger[_0x7f73('0x14')](_0x7f73('0x15'),_0x95285b,_0x7f73('0x13'),JSON[_0x7f73('0x16')](_0x567f33));if(_0x567f33[_0x7f73('0x17')]){if(_0x567f33[_0x7f73('0x17')]['code']===0x1f4){logger['error'](_0x7f73('0x12'),_0x95285b,_0x567f33['error'][_0x7f73('0x18')]);return _0x336847(_0x567f33[_0x7f73('0x17')][_0x7f73('0x18')]);}logger[_0x7f73('0x17')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x95285b,_0x567f33[_0x7f73('0x17')]['message']);return _0x1c96d1(_0x567f33[_0x7f73('0x17')][_0x7f73('0x18')]);}else{logger[_0x7f73('0x11')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x95285b,_0x7f73('0x13'));_0x1c96d1(_0x567f33[_0x7f73('0x19')][_0x7f73('0x18')]);}})[_0x7f73('0x1a')](function(_0x47e27a){logger[_0x7f73('0x17')](_0x7f73('0x12'),_0x95285b,_0x47e27a);_0x336847(_0x47e27a);});});}exports[_0x7f73('0x1b')]=function(_0x3e3e2c){var _0x11a101=this;return new Promise(function(_0x19b1ad,_0x332366){return db[_0x7f73('0x1c')][_0x7f73('0x1d')]({'raw':_0x3e3e2c[_0x7f73('0x1e')]?_0x3e3e2c[_0x7f73('0x1e')][_0x7f73('0x1f')]===undefined?!![]:![]:!![],'where':_0x3e3e2c[_0x7f73('0x1e')]?_0x3e3e2c[_0x7f73('0x1e')]['where']||null:null,'attributes':[[db[_0x7f73('0x20')]['fn'](_0x7f73('0x21'),db[_0x7f73('0x20')]['fn']('IF',db[_0x7f73('0x20')][_0x7f73('0x22')](_0x7f73('0x23')))),'outboundQueuePauses']]})['then'](function(_0x5eb651){logger[_0x7f73('0x11')]('GetVoiceQueueRtPauses',_0x3e3e2c);logger['debug']('GetVoiceQueueRtPauses',_0x3e3e2c,JSON[_0x7f73('0x16')](_0x5eb651));_0x19b1ad(_0x5eb651);})[_0x7f73('0x1a')](function(_0x8697b3){logger[_0x7f73('0x17')](_0x7f73('0x1b'),_0x8697b3[_0x7f73('0x18')],_0x3e3e2c);_0x332366(_0x11a101[_0x7f73('0x17')](0x1f4,_0x8697b3[_0x7f73('0x18')]));});});};
\ No newline at end of file