Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index a5e2873..483771f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1fc4=['http','redis','socket.io-emitter','./userVoiceQueueRt.socket','register','request','info','UserVoiceQueueRt,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','then','util','moment','bluebird','ioredis','../../mysqldb','../../config/environment','jayson/promise','client'];(function(_0x405281,_0x6a4947){var _0x37403e=function(_0x52f023){while(--_0x52f023){_0x405281['push'](_0x405281['shift']());}};_0x37403e(++_0x6a4947);}(_0x1fc4,0x88));var _0x41fc=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x1fc4[_0x1ac595];return _0x455fff;};'use strict';var _=require('lodash');var util=require(_0x41fc('0x0'));var moment=require(_0x41fc('0x1'));var BPromise=require(_0x41fc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x41fc('0x3'));var db=require(_0x41fc('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x41fc('0x5'));var jayson=require(_0x41fc('0x6'));var client=jayson[_0x41fc('0x7')][_0x41fc('0x8')]({'port':0x232a});config[_0x41fc('0x9')]=_['defaults'](config[_0x41fc('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x41fc('0xa'))(new Redis(config[_0x41fc('0x9')]));require(_0x41fc('0xb'))[_0x41fc('0xc')](socket);function respondWithRpcPromise(_0x275113,_0x27954e,_0x45e17d){return new BPromise(function(_0x238959,_0x182529){return client[_0x41fc('0xd')](_0x275113,_0x45e17d)['then'](function(_0x4e2758){logger[_0x41fc('0xe')](_0x41fc('0xf'),_0x27954e,'request\x20sent');logger[_0x41fc('0x10')]('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x27954e,_0x41fc('0x11'),JSON[_0x41fc('0x12')](_0x4e2758));if(_0x4e2758['error']){if(_0x4e2758[_0x41fc('0x13')][_0x41fc('0x14')]===0x1f4){logger[_0x41fc('0x13')](_0x41fc('0xf'),_0x27954e,_0x4e2758['error'][_0x41fc('0x15')]);return _0x182529(_0x4e2758['error']['message']);}logger['error'](_0x41fc('0xf'),_0x27954e,_0x4e2758[_0x41fc('0x13')][_0x41fc('0x15')]);return _0x238959(_0x4e2758[_0x41fc('0x13')]['message']);}else{logger[_0x41fc('0xe')](_0x41fc('0xf'),_0x27954e,_0x41fc('0x11'));_0x238959(_0x4e2758[_0x41fc('0x16')][_0x41fc('0x15')]);}})[_0x41fc('0x17')](function(_0x27727b){logger[_0x41fc('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x27954e,_0x27727b);_0x182529(_0x27727b);});});}exports[_0x41fc('0x18')]=function(_0x2a9eca){var _0x406f57=this;return new Promise(function(_0x64bd74,_0x27b5dc){return db[_0x41fc('0x19')][_0x41fc('0x1a')]({'raw':_0x2a9eca[_0x41fc('0x1b')]?_0x2a9eca[_0x41fc('0x1b')][_0x41fc('0x1c')]===undefined?!![]:![]:!![],'where':_0x2a9eca[_0x41fc('0x1b')]?_0x2a9eca[_0x41fc('0x1b')][_0x41fc('0x1d')]||null:null,'attributes':[[db[_0x41fc('0x1e')]['fn'](_0x41fc('0x1f'),db[_0x41fc('0x1e')]['fn']('IF',db[_0x41fc('0x1e')][_0x41fc('0x20')](_0x41fc('0x21')))),_0x41fc('0x22')]]})[_0x41fc('0x23')](function(_0x46b914){logger['info'](_0x41fc('0x18'),_0x2a9eca);logger[_0x41fc('0x10')](_0x41fc('0x18'),_0x2a9eca,JSON['stringify'](_0x46b914));_0x64bd74(_0x46b914);})[_0x41fc('0x17')](function(_0x537aea){logger[_0x41fc('0x13')]('GetVoiceQueueRtPauses',_0x537aea[_0x41fc('0x15')],_0x2a9eca);_0x27b5dc(_0x406f57['error'](0x1f4,_0x537aea[_0x41fc('0x15')]));});});};
\ No newline at end of file
+var _0xfda3=['message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','sequelize','COUNT','literal','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x498e58,_0x2d570b){var _0x43371c=function(_0x35d0d0){while(--_0x35d0d0){_0x498e58['push'](_0x498e58['shift']());}};_0x43371c(++_0x2d570b);}(_0xfda3,0x14c));var _0x3fda=function(_0x4789a4,_0x5b9016){_0x4789a4=_0x4789a4-0x0;var _0x2f2a51=_0xfda3[_0x4789a4];return _0x2f2a51;};'use strict';var _=require(_0x3fda('0x0'));var util=require(_0x3fda('0x1'));var moment=require(_0x3fda('0x2'));var BPromise=require(_0x3fda('0x3'));var rs=require(_0x3fda('0x4'));var fs=require('fs');var Redis=require(_0x3fda('0x5'));var db=require(_0x3fda('0x6'))['db'];var utils=require(_0x3fda('0x7'));var logger=require(_0x3fda('0x8'))('rpc');var config=require(_0x3fda('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x3fda('0xa')][_0x3fda('0xb')]({'port':0x232a});config[_0x3fda('0xc')]=_[_0x3fda('0xd')](config[_0x3fda('0xc')],{'host':_0x3fda('0xe'),'port':0x18eb});var socket=require(_0x3fda('0xf'))(new Redis(config[_0x3fda('0xc')]));require(_0x3fda('0x10'))[_0x3fda('0x11')](socket);function respondWithRpcPromise(_0x404f71,_0x5316ee,_0x6d6da4){return new BPromise(function(_0x394c3e,_0x166236){return client[_0x3fda('0x12')](_0x404f71,_0x6d6da4)[_0x3fda('0x13')](function(_0x13b72c){logger[_0x3fda('0x14')](_0x3fda('0x15'),_0x5316ee,'request\x20sent');logger[_0x3fda('0x16')](_0x3fda('0x17'),_0x5316ee,_0x3fda('0x18'),JSON[_0x3fda('0x19')](_0x13b72c));if(_0x13b72c[_0x3fda('0x1a')]){if(_0x13b72c[_0x3fda('0x1a')][_0x3fda('0x1b')]===0x1f4){logger[_0x3fda('0x1a')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x5316ee,_0x13b72c[_0x3fda('0x1a')][_0x3fda('0x1c')]);return _0x166236(_0x13b72c[_0x3fda('0x1a')][_0x3fda('0x1c')]);}logger[_0x3fda('0x1a')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x5316ee,_0x13b72c[_0x3fda('0x1a')][_0x3fda('0x1c')]);return _0x394c3e(_0x13b72c[_0x3fda('0x1a')][_0x3fda('0x1c')]);}else{logger[_0x3fda('0x14')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x5316ee,_0x3fda('0x18'));_0x394c3e(_0x13b72c[_0x3fda('0x1d')]['message']);}})[_0x3fda('0x1e')](function(_0x54efc7){logger[_0x3fda('0x1a')](_0x3fda('0x15'),_0x5316ee,_0x54efc7);_0x166236(_0x54efc7);});});}exports[_0x3fda('0x1f')]=function(_0xbed602){var _0xa6985e=this;return new Promise(function(_0x1543ff,_0x4300f6){return db[_0x3fda('0x20')][_0x3fda('0x21')]({'raw':_0xbed602[_0x3fda('0x22')]?_0xbed602[_0x3fda('0x22')][_0x3fda('0x23')]===undefined?!![]:![]:!![],'where':_0xbed602[_0x3fda('0x22')]?_0xbed602[_0x3fda('0x22')][_0x3fda('0x24')]||null:null,'attributes':[[db[_0x3fda('0x25')]['fn'](_0x3fda('0x26'),db[_0x3fda('0x25')]['fn']('IF',db[_0x3fda('0x25')][_0x3fda('0x27')]('`paused`\x20=\x201,\x201,\x20null'))),'outboundQueuePauses']]})[_0x3fda('0x13')](function(_0x24adfb){logger['info'](_0x3fda('0x1f'),_0xbed602);logger[_0x3fda('0x16')]('GetVoiceQueueRtPauses',_0xbed602,JSON[_0x3fda('0x19')](_0x24adfb));_0x1543ff(_0x24adfb);})[_0x3fda('0x1e')](function(_0x3c7f47){logger[_0x3fda('0x1a')](_0x3fda('0x1f'),_0x3c7f47[_0x3fda('0x1c')],_0xbed602);_0x4300f6(_0xa6985e[_0x3fda('0x1a')](0x1f4,_0x3c7f47[_0x3fda('0x1c')]));});});};
\ No newline at end of file