Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index c41efed..eba1a83 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c93=['stringify','error','code','message','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','attributes','limit','include','map','model','catch','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s'];(function(_0x1c37cb,_0x214f8e){var _0x2c221e=function(_0x66fcc5){while(--_0x66fcc5){_0x1c37cb['push'](_0x1c37cb['shift']());}};_0x2c221e(++_0x214f8e);}(_0x4c93,0x182));var _0x34c9=function(_0x83e4b3,_0x339ea9){_0x83e4b3=_0x83e4b3-0x0;var _0x40dfa7=_0x4c93[_0x83e4b3];return _0x40dfa7;};'use strict';var _=require(_0x34c9('0x0'));var util=require(_0x34c9('0x1'));var moment=require(_0x34c9('0x2'));var BPromise=require(_0x34c9('0x3'));var rs=require(_0x34c9('0x4'));var fs=require('fs');var Redis=require(_0x34c9('0x5'));var db=require(_0x34c9('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x34c9('0x7'))(_0x34c9('0x8'));var config=require(_0x34c9('0x9'));var jayson=require(_0x34c9('0xa'));var client=jayson['client'][_0x34c9('0xb')]({'port':0x232a});config[_0x34c9('0xc')]=_[_0x34c9('0xd')](config[_0x34c9('0xc')],{'host':_0x34c9('0xe'),'port':0x18eb});var socket=require(_0x34c9('0xf'))(new Redis(config[_0x34c9('0xc')]));require('./openchannelQueue.socket')[_0x34c9('0x10')](socket);function respondWithRpcPromise(_0x31aa6f,_0xd1dffb,_0x10e8dc){return new BPromise(function(_0x893a74,_0x5d791e){return client[_0x34c9('0x11')](_0x31aa6f,_0x10e8dc)[_0x34c9('0x12')](function(_0x535b8c){logger[_0x34c9('0x13')](_0x34c9('0x14'),_0xd1dffb,_0x34c9('0x15'));logger[_0x34c9('0x16')](_0x34c9('0x17'),_0xd1dffb,'request\x20sent',JSON[_0x34c9('0x18')](_0x535b8c));if(_0x535b8c[_0x34c9('0x19')]){if(_0x535b8c[_0x34c9('0x19')][_0x34c9('0x1a')]===0x1f4){logger[_0x34c9('0x19')](_0x34c9('0x14'),_0xd1dffb,_0x535b8c[_0x34c9('0x19')][_0x34c9('0x1b')]);return _0x5d791e(_0x535b8c[_0x34c9('0x19')][_0x34c9('0x1b')]);}logger[_0x34c9('0x19')](_0x34c9('0x14'),_0xd1dffb,_0x535b8c[_0x34c9('0x19')][_0x34c9('0x1b')]);return _0x893a74(_0x535b8c[_0x34c9('0x19')][_0x34c9('0x1b')]);}else{logger[_0x34c9('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0xd1dffb,_0x34c9('0x15'));_0x893a74(_0x535b8c['result'][_0x34c9('0x1b')]);}})['catch'](function(_0x34fd81){logger['error'](_0x34c9('0x14'),_0xd1dffb,_0x34fd81);_0x5d791e(_0x34fd81);});});}exports[_0x34c9('0x1c')]=function(_0x568135){var _0x4dd109=this;return new Promise(function(_0x20be57,_0x83d1d5){return db[_0x34c9('0x1d')][_0x34c9('0x1e')]({'raw':_0x568135[_0x34c9('0x1f')]?_0x568135[_0x34c9('0x1f')][_0x34c9('0x20')]===undefined?!![]:![]:!![],'where':_0x568135['options']?_0x568135['options'][_0x34c9('0x21')]||null:null,'attributes':_0x568135[_0x34c9('0x1f')]?_0x568135[_0x34c9('0x1f')][_0x34c9('0x22')]||null:null,'limit':_0x568135[_0x34c9('0x1f')]?_0x568135[_0x34c9('0x1f')][_0x34c9('0x23')]||null:null,'include':_0x568135['options']?_0x568135['options'][_0x34c9('0x24')]?_[_0x34c9('0x25')](_0x568135[_0x34c9('0x1f')][_0x34c9('0x24')],function(_0x5b887f){return{'model':db[_0x5b887f[_0x34c9('0x26')]],'as':_0x5b887f['as'],'attributes':_0x5b887f[_0x34c9('0x22')],'include':_0x5b887f[_0x34c9('0x24')]?_[_0x34c9('0x25')](_0x5b887f[_0x34c9('0x24')],function(_0xa7be09){return{'model':db[_0xa7be09[_0x34c9('0x26')]],'as':_0xa7be09['as'],'attributes':_0xa7be09[_0x34c9('0x22')],'include':_0xa7be09['include']?_[_0x34c9('0x25')](_0xa7be09[_0x34c9('0x24')],function(_0x5ba177){return{'model':db[_0x5ba177[_0x34c9('0x26')]],'as':_0x5ba177['as'],'attributes':_0x5ba177[_0x34c9('0x22')]};}):[]};}):[]};}):[]:[]})[_0x34c9('0x12')](function(_0x2254bb){logger[_0x34c9('0x13')](_0x34c9('0x1c'),_0x568135);logger[_0x34c9('0x16')](_0x34c9('0x1c'),_0x568135,JSON[_0x34c9('0x18')](_0x2254bb));_0x20be57(_0x2254bb);})[_0x34c9('0x27')](function(_0x3e0cff){logger[_0x34c9('0x19')](_0x34c9('0x1c'),_0x3e0cff[_0x34c9('0x1b')],_0x568135);_0x83d1d5(_0x4dd109[_0x34c9('0x19')](0x1f4,_0x3e0cff[_0x34c9('0x1b')]));});});};exports[_0x34c9('0x28')]=function(_0x1b6936){var _0x4eed95=this;return new Promise(function(_0x309ed8,_0x785f2){return db['OpenchannelQueue']['find']({'raw':_0x1b6936[_0x34c9('0x1f')]?_0x1b6936[_0x34c9('0x1f')][_0x34c9('0x20')]===undefined?!![]:![]:!![],'where':_0x1b6936[_0x34c9('0x1f')]?_0x1b6936[_0x34c9('0x1f')][_0x34c9('0x21')]||null:null,'attributes':_0x1b6936[_0x34c9('0x1f')]?_0x1b6936['options'][_0x34c9('0x22')]||null:null,'include':_0x1b6936['options']?_0x1b6936[_0x34c9('0x1f')]['include']?_[_0x34c9('0x25')](_0x1b6936[_0x34c9('0x1f')][_0x34c9('0x24')],function(_0x134676){return{'model':db[_0x134676[_0x34c9('0x26')]],'as':_0x134676['as'],'attributes':_0x134676[_0x34c9('0x22')],'include':_0x134676[_0x34c9('0x24')]?_[_0x34c9('0x25')](_0x134676[_0x34c9('0x24')],function(_0x327354){return{'model':db[_0x327354[_0x34c9('0x26')]],'as':_0x327354['as'],'attributes':_0x327354[_0x34c9('0x22')],'include':_0x327354[_0x34c9('0x24')]?_[_0x34c9('0x25')](_0x327354[_0x34c9('0x24')],function(_0x36d7b8){return{'model':db[_0x36d7b8[_0x34c9('0x26')]],'as':_0x36d7b8['as'],'attributes':_0x36d7b8['attributes']};}):[]};}):[]};}):[]:[]})[_0x34c9('0x12')](function(_0x22231b){logger[_0x34c9('0x13')]('ShowOpenchannelQueue',_0x1b6936);logger[_0x34c9('0x16')](_0x34c9('0x28'),_0x1b6936,JSON[_0x34c9('0x18')](_0x22231b));_0x309ed8(_0x22231b);})[_0x34c9('0x27')](function(_0x339ba9){logger['error'](_0x34c9('0x28'),_0x339ba9['message'],_0x1b6936);_0x785f2(_0x4eed95[_0x34c9('0x19')](0x1f4,_0x339ba9['message']));});});};
\ No newline at end of file
+var _0xb424=['request\x20sent','debug','stringify','error','code','message','GetOpenchannelQueue','OpenchannelQueue','options','raw','attributes','limit','model','include','map','catch','ShowOpenchannelQueue','find','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','info','OpenchannelQueue,\x20%s,\x20%s'];(function(_0xffd697,_0x3b7975){var _0x267da2=function(_0x52d355){while(--_0x52d355){_0xffd697['push'](_0xffd697['shift']());}};_0x267da2(++_0x3b7975);}(_0xb424,0x115));var _0x4b42=function(_0x5a26db,_0x2c5ccd){_0x5a26db=_0x5a26db-0x0;var _0x4619dd=_0xb424[_0x5a26db];return _0x4619dd;};'use strict';var _=require(_0x4b42('0x0'));var util=require(_0x4b42('0x1'));var moment=require(_0x4b42('0x2'));var BPromise=require(_0x4b42('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4b42('0x4'))['db'];var utils=require(_0x4b42('0x5'));var logger=require(_0x4b42('0x6'))(_0x4b42('0x7'));var config=require(_0x4b42('0x8'));var jayson=require(_0x4b42('0x9'));var client=jayson[_0x4b42('0xa')][_0x4b42('0xb')]({'port':0x232a});config['redis']=_[_0x4b42('0xc')](config['redis'],{'host':_0x4b42('0xd'),'port':0x18eb});var socket=require(_0x4b42('0xe'))(new Redis(config['redis']));require(_0x4b42('0xf'))[_0x4b42('0x10')](socket);function respondWithRpcPromise(_0x38b517,_0x29c1d6,_0x379f3c){return new BPromise(function(_0x3dd4ac,_0x4d9e10){return client['request'](_0x38b517,_0x379f3c)['then'](function(_0x353db8){logger[_0x4b42('0x11')](_0x4b42('0x12'),_0x29c1d6,_0x4b42('0x13'));logger[_0x4b42('0x14')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x29c1d6,_0x4b42('0x13'),JSON[_0x4b42('0x15')](_0x353db8));if(_0x353db8[_0x4b42('0x16')]){if(_0x353db8[_0x4b42('0x16')][_0x4b42('0x17')]===0x1f4){logger[_0x4b42('0x16')](_0x4b42('0x12'),_0x29c1d6,_0x353db8[_0x4b42('0x16')][_0x4b42('0x18')]);return _0x4d9e10(_0x353db8[_0x4b42('0x16')]['message']);}logger[_0x4b42('0x16')](_0x4b42('0x12'),_0x29c1d6,_0x353db8[_0x4b42('0x16')][_0x4b42('0x18')]);return _0x3dd4ac(_0x353db8[_0x4b42('0x16')][_0x4b42('0x18')]);}else{logger[_0x4b42('0x11')](_0x4b42('0x12'),_0x29c1d6,_0x4b42('0x13'));_0x3dd4ac(_0x353db8['result'][_0x4b42('0x18')]);}})['catch'](function(_0x229fcd){logger['error']('OpenchannelQueue,\x20%s,\x20%s',_0x29c1d6,_0x229fcd);_0x4d9e10(_0x229fcd);});});}exports[_0x4b42('0x19')]=function(_0x5f3748){var _0x2fba5b=this;return new Promise(function(_0x26114a,_0x4bd981){return db[_0x4b42('0x1a')]['findAll']({'raw':_0x5f3748[_0x4b42('0x1b')]?_0x5f3748['options'][_0x4b42('0x1c')]===undefined?!![]:![]:!![],'where':_0x5f3748[_0x4b42('0x1b')]?_0x5f3748['options']['where']||null:null,'attributes':_0x5f3748['options']?_0x5f3748[_0x4b42('0x1b')][_0x4b42('0x1d')]||null:null,'limit':_0x5f3748['options']?_0x5f3748[_0x4b42('0x1b')][_0x4b42('0x1e')]||null:null,'include':_0x5f3748['options']?_0x5f3748['options']['include']?_['map'](_0x5f3748[_0x4b42('0x1b')]['include'],function(_0x115ee3){return{'model':db[_0x115ee3[_0x4b42('0x1f')]],'as':_0x115ee3['as'],'attributes':_0x115ee3['attributes'],'include':_0x115ee3[_0x4b42('0x20')]?_[_0x4b42('0x21')](_0x115ee3[_0x4b42('0x20')],function(_0x5a83e6){return{'model':db[_0x5a83e6['model']],'as':_0x5a83e6['as'],'attributes':_0x5a83e6['attributes'],'include':_0x5a83e6[_0x4b42('0x20')]?_[_0x4b42('0x21')](_0x5a83e6['include'],function(_0x592f30){return{'model':db[_0x592f30[_0x4b42('0x1f')]],'as':_0x592f30['as'],'attributes':_0x592f30[_0x4b42('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x813dd8){logger[_0x4b42('0x11')](_0x4b42('0x19'),_0x5f3748);logger[_0x4b42('0x14')]('GetOpenchannelQueue',_0x5f3748,JSON[_0x4b42('0x15')](_0x813dd8));_0x26114a(_0x813dd8);})[_0x4b42('0x22')](function(_0x197691){logger[_0x4b42('0x16')](_0x4b42('0x19'),_0x197691[_0x4b42('0x18')],_0x5f3748);_0x4bd981(_0x2fba5b[_0x4b42('0x16')](0x1f4,_0x197691[_0x4b42('0x18')]));});});};exports[_0x4b42('0x23')]=function(_0x298eae){var _0x9b5893=this;return new Promise(function(_0x384755,_0x3099a3){return db[_0x4b42('0x1a')][_0x4b42('0x24')]({'raw':_0x298eae[_0x4b42('0x1b')]?_0x298eae[_0x4b42('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x298eae[_0x4b42('0x1b')]?_0x298eae['options']['where']||null:null,'attributes':_0x298eae[_0x4b42('0x1b')]?_0x298eae[_0x4b42('0x1b')][_0x4b42('0x1d')]||null:null,'include':_0x298eae[_0x4b42('0x1b')]?_0x298eae[_0x4b42('0x1b')][_0x4b42('0x20')]?_[_0x4b42('0x21')](_0x298eae[_0x4b42('0x1b')][_0x4b42('0x20')],function(_0x2a872e){return{'model':db[_0x2a872e[_0x4b42('0x1f')]],'as':_0x2a872e['as'],'attributes':_0x2a872e['attributes'],'include':_0x2a872e[_0x4b42('0x20')]?_[_0x4b42('0x21')](_0x2a872e[_0x4b42('0x20')],function(_0x6ab81e){return{'model':db[_0x6ab81e[_0x4b42('0x1f')]],'as':_0x6ab81e['as'],'attributes':_0x6ab81e[_0x4b42('0x1d')],'include':_0x6ab81e[_0x4b42('0x20')]?_[_0x4b42('0x21')](_0x6ab81e[_0x4b42('0x20')],function(_0x5c7a7b){return{'model':db[_0x5c7a7b[_0x4b42('0x1f')]],'as':_0x5c7a7b['as'],'attributes':_0x5c7a7b[_0x4b42('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x56911c){logger[_0x4b42('0x11')](_0x4b42('0x23'),_0x298eae);logger[_0x4b42('0x14')]('ShowOpenchannelQueue',_0x298eae,JSON['stringify'](_0x56911c));_0x384755(_0x56911c);})[_0x4b42('0x22')](function(_0x2908dc){logger['error']('ShowOpenchannelQueue',_0x2908dc[_0x4b42('0x18')],_0x298eae);_0x3099a3(_0x9b5893[_0x4b42('0x16')](0x1f4,_0x2908dc['message']));});});};
\ No newline at end of file