Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index 368be63..78a79d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf7a9=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','client','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','request','then','info','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','message','UserVoiceQueueRt,\x20%s,\x20%s','result','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','sequelize','COUNT','literal','outboundQueuePauses','catch'];(function(_0x3cd2d3,_0x6732e3){var _0x12c393=function(_0x6cabb4){while(--_0x6cabb4){_0x3cd2d3['push'](_0x3cd2d3['shift']());}};_0x12c393(++_0x6732e3);}(_0xf7a9,0x1e1));var _0x9f7a=function(_0x346cb0,_0x293492){_0x346cb0=_0x346cb0-0x0;var _0x38cadf=_0xf7a9[_0x346cb0];return _0x38cadf;};'use strict';var _=require(_0x9f7a('0x0'));var util=require(_0x9f7a('0x1'));var moment=require(_0x9f7a('0x2'));var BPromise=require(_0x9f7a('0x3'));var rs=require(_0x9f7a('0x4'));var fs=require('fs');var Redis=require(_0x9f7a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x9f7a('0x6'));var logger=require(_0x9f7a('0x7'))(_0x9f7a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9f7a('0x9')]['http']({'port':0x232a});config[_0x9f7a('0xa')]=_[_0x9f7a('0xb')](config[_0x9f7a('0xa')],{'host':_0x9f7a('0xc'),'port':0x18eb});var socket=require(_0x9f7a('0xd'))(new Redis(config[_0x9f7a('0xa')]));require(_0x9f7a('0xe'))['register'](socket);function respondWithRpcPromise(_0x136efa,_0x510c7e,_0x4c61ee){return new BPromise(function(_0xbd41e3,_0x48c6c8){return client[_0x9f7a('0xf')](_0x136efa,_0x4c61ee)[_0x9f7a('0x10')](function(_0x4bcb3d){logger[_0x9f7a('0x11')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x510c7e,_0x9f7a('0x12'));logger[_0x9f7a('0x13')](_0x9f7a('0x14'),_0x510c7e,_0x9f7a('0x12'),JSON[_0x9f7a('0x15')](_0x4bcb3d));if(_0x4bcb3d[_0x9f7a('0x16')]){if(_0x4bcb3d[_0x9f7a('0x16')][_0x9f7a('0x17')]===0x1f4){logger[_0x9f7a('0x16')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x510c7e,_0x4bcb3d[_0x9f7a('0x16')][_0x9f7a('0x18')]);return _0x48c6c8(_0x4bcb3d[_0x9f7a('0x16')][_0x9f7a('0x18')]);}logger[_0x9f7a('0x16')](_0x9f7a('0x19'),_0x510c7e,_0x4bcb3d[_0x9f7a('0x16')]['message']);return _0xbd41e3(_0x4bcb3d[_0x9f7a('0x16')]['message']);}else{logger[_0x9f7a('0x11')](_0x9f7a('0x19'),_0x510c7e,'request\x20sent');_0xbd41e3(_0x4bcb3d[_0x9f7a('0x1a')][_0x9f7a('0x18')]);}})['catch'](function(_0x41f038){logger[_0x9f7a('0x16')](_0x9f7a('0x19'),_0x510c7e,_0x41f038);_0x48c6c8(_0x41f038);});});}exports[_0x9f7a('0x1b')]=function(_0x29cfd1){var _0x4acbcc=this;return new Promise(function(_0x2a6d97,_0x4ae3e4){return db[_0x9f7a('0x1c')][_0x9f7a('0x1d')]({'raw':_0x29cfd1[_0x9f7a('0x1e')]?_0x29cfd1['options'][_0x9f7a('0x1f')]===undefined?!![]:![]:!![],'where':_0x29cfd1[_0x9f7a('0x1e')]?_0x29cfd1['options']['where']||null:null,'attributes':[[db[_0x9f7a('0x20')]['fn'](_0x9f7a('0x21'),db[_0x9f7a('0x20')]['fn']('IF',db[_0x9f7a('0x20')][_0x9f7a('0x22')]('`paused`\x20=\x201,\x201,\x20null'))),_0x9f7a('0x23')]]})[_0x9f7a('0x10')](function(_0x3fbd50){logger[_0x9f7a('0x11')](_0x9f7a('0x1b'),_0x29cfd1);logger['debug']('GetVoiceQueueRtPauses',_0x29cfd1,JSON[_0x9f7a('0x15')](_0x3fbd50));_0x2a6d97(_0x3fbd50);})[_0x9f7a('0x24')](function(_0x4b1f46){logger[_0x9f7a('0x16')](_0x9f7a('0x1b'),_0x4b1f46[_0x9f7a('0x18')],_0x29cfd1);_0x4ae3e4(_0x4acbcc[_0x9f7a('0x16')](0x1f4,_0x4b1f46['message']));});});};
\ No newline at end of file
+var _0x3a55=['debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','findAll','options','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','GetVoiceQueueRtPauses','stringify','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent'];(function(_0x44f8c5,_0x5de414){var _0x2b21cf=function(_0x45e803){while(--_0x45e803){_0x44f8c5['push'](_0x44f8c5['shift']());}};_0x2b21cf(++_0x5de414);}(_0x3a55,0x1e6));var _0x53a5=function(_0x21929,_0x487f96){_0x21929=_0x21929-0x0;var _0x1e7237=_0x3a55[_0x21929];return _0x1e7237;};'use strict';var _=require(_0x53a5('0x0'));var util=require('util');var moment=require(_0x53a5('0x1'));var BPromise=require('bluebird');var rs=require(_0x53a5('0x2'));var fs=require('fs');var Redis=require(_0x53a5('0x3'));var db=require(_0x53a5('0x4'))['db'];var utils=require(_0x53a5('0x5'));var logger=require(_0x53a5('0x6'))(_0x53a5('0x7'));var config=require(_0x53a5('0x8'));var jayson=require(_0x53a5('0x9'));var client=jayson[_0x53a5('0xa')][_0x53a5('0xb')]({'port':0x232a});config[_0x53a5('0xc')]=_[_0x53a5('0xd')](config[_0x53a5('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x53a5('0xe'))(new Redis(config[_0x53a5('0xc')]));require(_0x53a5('0xf'))[_0x53a5('0x10')](socket);function respondWithRpcPromise(_0x53fd1d,_0x2b290c,_0x3fb8c5){return new BPromise(function(_0x3fc352,_0xd9484b){return client[_0x53a5('0x11')](_0x53fd1d,_0x3fb8c5)[_0x53a5('0x12')](function(_0x503a43){logger['info'](_0x53a5('0x13'),_0x2b290c,_0x53a5('0x14'));logger[_0x53a5('0x15')](_0x53a5('0x16'),_0x2b290c,'request\x20sent',JSON['stringify'](_0x503a43));if(_0x503a43[_0x53a5('0x17')]){if(_0x503a43['error'][_0x53a5('0x18')]===0x1f4){logger['error'](_0x53a5('0x13'),_0x2b290c,_0x503a43[_0x53a5('0x17')][_0x53a5('0x19')]);return _0xd9484b(_0x503a43[_0x53a5('0x17')]['message']);}logger['error']('UserVoiceQueueRt,\x20%s,\x20%s',_0x2b290c,_0x503a43['error']['message']);return _0x3fc352(_0x503a43['error'][_0x53a5('0x19')]);}else{logger[_0x53a5('0x1a')](_0x53a5('0x13'),_0x2b290c,_0x53a5('0x14'));_0x3fc352(_0x503a43[_0x53a5('0x1b')][_0x53a5('0x19')]);}})[_0x53a5('0x1c')](function(_0x38d1a6){logger[_0x53a5('0x17')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x2b290c,_0x38d1a6);_0xd9484b(_0x38d1a6);});});}exports['GetVoiceQueueRtPauses']=function(_0x2a4f6a){var _0x365a03=this;return new Promise(function(_0x180954,_0x115c3b){return db['UserVoiceQueueRt'][_0x53a5('0x1d')]({'raw':_0x2a4f6a[_0x53a5('0x1e')]?_0x2a4f6a[_0x53a5('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x2a4f6a[_0x53a5('0x1e')]?_0x2a4f6a[_0x53a5('0x1e')][_0x53a5('0x1f')]||null:null,'attributes':[[db[_0x53a5('0x20')]['fn'](_0x53a5('0x21'),db[_0x53a5('0x20')]['fn']('IF',db[_0x53a5('0x20')][_0x53a5('0x22')](_0x53a5('0x23')))),_0x53a5('0x24')]]})['then'](function(_0x42ecc7){logger['info']('GetVoiceQueueRtPauses',_0x2a4f6a);logger['debug'](_0x53a5('0x25'),_0x2a4f6a,JSON[_0x53a5('0x26')](_0x42ecc7));_0x180954(_0x42ecc7);})[_0x53a5('0x1c')](function(_0xcb742a){logger[_0x53a5('0x17')](_0x53a5('0x25'),_0xcb742a[_0x53a5('0x19')],_0x2a4f6a);_0x115c3b(_0x365a03[_0x53a5('0x17')](0x1f4,_0xcb742a[_0x53a5('0x19')]));});});};
\ No newline at end of file