Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index a5e2873..661b233 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 _0x2c5d=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','info','request\x20sent','debug','stringify','error','message','UserVoiceQueueRt,\x20%s,\x20%s','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','then','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x32a4fc,_0x8d7cff){var _0x120b8d=function(_0x3de990){while(--_0x3de990){_0x32a4fc['push'](_0x32a4fc['shift']());}};_0x120b8d(++_0x8d7cff);}(_0x2c5d,0xde));var _0xd2c5=function(_0x34f807,_0x3f9b45){_0x34f807=_0x34f807-0x0;var _0x570597=_0x2c5d[_0x34f807];return _0x570597;};'use strict';var _=require('lodash');var util=require(_0xd2c5('0x0'));var moment=require(_0xd2c5('0x1'));var BPromise=require(_0xd2c5('0x2'));var rs=require(_0xd2c5('0x3'));var fs=require('fs');var Redis=require(_0xd2c5('0x4'));var db=require(_0xd2c5('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xd2c5('0x6'))(_0xd2c5('0x7'));var config=require(_0xd2c5('0x8'));var jayson=require(_0xd2c5('0x9'));var client=jayson[_0xd2c5('0xa')][_0xd2c5('0xb')]({'port':0x232a});config[_0xd2c5('0xc')]=_[_0xd2c5('0xd')](config[_0xd2c5('0xc')],{'host':_0xd2c5('0xe'),'port':0x18eb});var socket=require(_0xd2c5('0xf'))(new Redis(config[_0xd2c5('0xc')]));require('./userVoiceQueueRt.socket')[_0xd2c5('0x10')](socket);function respondWithRpcPromise(_0x46f1f0,_0x2d372f,_0xe7886){return new BPromise(function(_0x3430a7,_0x160dba){return client[_0xd2c5('0x11')](_0x46f1f0,_0xe7886)['then'](function(_0x40f637){logger[_0xd2c5('0x12')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x2d372f,_0xd2c5('0x13'));logger[_0xd2c5('0x14')]('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x2d372f,_0xd2c5('0x13'),JSON[_0xd2c5('0x15')](_0x40f637));if(_0x40f637['error']){if(_0x40f637['error']['code']===0x1f4){logger[_0xd2c5('0x16')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x2d372f,_0x40f637[_0xd2c5('0x16')][_0xd2c5('0x17')]);return _0x160dba(_0x40f637[_0xd2c5('0x16')][_0xd2c5('0x17')]);}logger['error']('UserVoiceQueueRt,\x20%s,\x20%s',_0x2d372f,_0x40f637[_0xd2c5('0x16')]['message']);return _0x3430a7(_0x40f637[_0xd2c5('0x16')][_0xd2c5('0x17')]);}else{logger[_0xd2c5('0x12')](_0xd2c5('0x18'),_0x2d372f,_0xd2c5('0x13'));_0x3430a7(_0x40f637[_0xd2c5('0x19')][_0xd2c5('0x17')]);}})[_0xd2c5('0x1a')](function(_0x1bbd3d){logger[_0xd2c5('0x16')](_0xd2c5('0x18'),_0x2d372f,_0x1bbd3d);_0x160dba(_0x1bbd3d);});});}exports[_0xd2c5('0x1b')]=function(_0x7b3a0a){var _0x52f8ce=this;return new Promise(function(_0x27b1ee,_0x5630c0){return db[_0xd2c5('0x1c')][_0xd2c5('0x1d')]({'raw':_0x7b3a0a[_0xd2c5('0x1e')]?_0x7b3a0a[_0xd2c5('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x7b3a0a['options']?_0x7b3a0a[_0xd2c5('0x1e')][_0xd2c5('0x1f')]||null:null,'attributes':[[db[_0xd2c5('0x20')]['fn'](_0xd2c5('0x21'),db[_0xd2c5('0x20')]['fn']('IF',db[_0xd2c5('0x20')][_0xd2c5('0x22')](_0xd2c5('0x23')))),_0xd2c5('0x24')]]})[_0xd2c5('0x25')](function(_0x3cd251){logger[_0xd2c5('0x12')](_0xd2c5('0x1b'),_0x7b3a0a);logger[_0xd2c5('0x14')](_0xd2c5('0x1b'),_0x7b3a0a,JSON[_0xd2c5('0x15')](_0x3cd251));_0x27b1ee(_0x3cd251);})[_0xd2c5('0x1a')](function(_0xb021b6){logger[_0xd2c5('0x16')](_0xd2c5('0x1b'),_0xb021b6[_0xd2c5('0x17')],_0x7b3a0a);_0x5630c0(_0x52f8ce[_0xd2c5('0x16')](0x1f4,_0xb021b6['message']));});});};
\ No newline at end of file