Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index d63a346..69c5f9c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21df=['localhost','socket.io-emitter','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','attributes','limit','map','include','model','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults'];(function(_0x85c87b,_0x5377a7){var _0x262906=function(_0x5b92b3){while(--_0x5b92b3){_0x85c87b['push'](_0x85c87b['shift']());}};_0x262906(++_0x5377a7);}(_0x21df,0x12b));var _0xf21d=function(_0x21a06a,_0x5be4a5){_0x21a06a=_0x21a06a-0x0;var _0x289657=_0x21df[_0x21a06a];return _0x289657;};'use strict';var _=require(_0xf21d('0x0'));var util=require(_0xf21d('0x1'));var moment=require(_0xf21d('0x2'));var BPromise=require(_0xf21d('0x3'));var rs=require(_0xf21d('0x4'));var fs=require('fs');var Redis=require(_0xf21d('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf21d('0x6'));var logger=require(_0xf21d('0x7'))('rpc');var config=require(_0xf21d('0x8'));var jayson=require(_0xf21d('0x9'));var client=jayson[_0xf21d('0xa')]['http']({'port':0x232a});config[_0xf21d('0xb')]=_[_0xf21d('0xc')](config['redis'],{'host':_0xf21d('0xd'),'port':0x18eb});var socket=require(_0xf21d('0xe'))(new Redis(config[_0xf21d('0xb')]));require('./openchannelQueue.socket')['register'](socket);function respondWithRpcPromise(_0x31b1e6,_0x2509ad,_0x1a62ff){return new BPromise(function(_0x38baa5,_0x2354ed){return client[_0xf21d('0xf')](_0x31b1e6,_0x1a62ff)[_0xf21d('0x10')](function(_0x5e9ccb){logger[_0xf21d('0x11')](_0xf21d('0x12'),_0x2509ad,_0xf21d('0x13'));logger[_0xf21d('0x14')](_0xf21d('0x15'),_0x2509ad,'request\x20sent',JSON[_0xf21d('0x16')](_0x5e9ccb));if(_0x5e9ccb[_0xf21d('0x17')]){if(_0x5e9ccb[_0xf21d('0x17')][_0xf21d('0x18')]===0x1f4){logger[_0xf21d('0x17')](_0xf21d('0x12'),_0x2509ad,_0x5e9ccb[_0xf21d('0x17')][_0xf21d('0x19')]);return _0x2354ed(_0x5e9ccb[_0xf21d('0x17')][_0xf21d('0x19')]);}logger['error'](_0xf21d('0x12'),_0x2509ad,_0x5e9ccb[_0xf21d('0x17')]['message']);return _0x38baa5(_0x5e9ccb['error']['message']);}else{logger[_0xf21d('0x11')]('OpenchannelQueue,\x20%s,\x20%s',_0x2509ad,_0xf21d('0x13'));_0x38baa5(_0x5e9ccb['result'][_0xf21d('0x19')]);}})[_0xf21d('0x1a')](function(_0xbbae2a){logger[_0xf21d('0x17')](_0xf21d('0x12'),_0x2509ad,_0xbbae2a);_0x2354ed(_0xbbae2a);});});}exports[_0xf21d('0x1b')]=function(_0x1053c0){var _0x3666e0=this;return new Promise(function(_0xe16056,_0x2211bd){return db[_0xf21d('0x1c')][_0xf21d('0x1d')]({'raw':_0x1053c0['options']?_0x1053c0[_0xf21d('0x1e')][_0xf21d('0x1f')]===undefined?!![]:![]:!![],'where':_0x1053c0[_0xf21d('0x1e')]?_0x1053c0[_0xf21d('0x1e')][_0xf21d('0x20')]||null:null,'attributes':_0x1053c0[_0xf21d('0x1e')]?_0x1053c0['options'][_0xf21d('0x21')]||null:null,'limit':_0x1053c0['options']?_0x1053c0[_0xf21d('0x1e')][_0xf21d('0x22')]||null:null,'include':_0x1053c0['options']?_0x1053c0[_0xf21d('0x1e')]['include']?_[_0xf21d('0x23')](_0x1053c0[_0xf21d('0x1e')][_0xf21d('0x24')],function(_0x43cdf2){return{'model':db[_0x43cdf2[_0xf21d('0x25')]],'as':_0x43cdf2['as'],'attributes':_0x43cdf2['attributes'],'include':_0x43cdf2[_0xf21d('0x24')]?_['map'](_0x43cdf2[_0xf21d('0x24')],function(_0x7b83d0){return{'model':db[_0x7b83d0[_0xf21d('0x25')]],'as':_0x7b83d0['as'],'attributes':_0x7b83d0[_0xf21d('0x21')],'include':_0x7b83d0['include']?_['map'](_0x7b83d0[_0xf21d('0x24')],function(_0x6dcc86){return{'model':db[_0x6dcc86[_0xf21d('0x25')]],'as':_0x6dcc86['as'],'attributes':_0x6dcc86[_0xf21d('0x21')]};}):[]};}):[]};}):[]:[]})[_0xf21d('0x10')](function(_0x3e7e8d){logger[_0xf21d('0x11')](_0xf21d('0x1b'),_0x1053c0);logger[_0xf21d('0x14')](_0xf21d('0x1b'),_0x1053c0,JSON[_0xf21d('0x16')](_0x3e7e8d));_0xe16056(_0x3e7e8d);})[_0xf21d('0x1a')](function(_0x9d081e){logger['error'](_0xf21d('0x1b'),_0x9d081e[_0xf21d('0x19')],_0x1053c0);_0x2211bd(_0x3666e0[_0xf21d('0x17')](0x1f4,_0x9d081e[_0xf21d('0x19')]));});});};exports[_0xf21d('0x26')]=function(_0xc023da){var _0x8d0cdf=this;return new Promise(function(_0x5f68c7,_0x44f9dd){return db[_0xf21d('0x1c')]['find']({'raw':_0xc023da[_0xf21d('0x1e')]?_0xc023da[_0xf21d('0x1e')][_0xf21d('0x1f')]===undefined?!![]:![]:!![],'where':_0xc023da[_0xf21d('0x1e')]?_0xc023da['options']['where']||null:null,'attributes':_0xc023da[_0xf21d('0x1e')]?_0xc023da[_0xf21d('0x1e')]['attributes']||null:null,'include':_0xc023da[_0xf21d('0x1e')]?_0xc023da[_0xf21d('0x1e')][_0xf21d('0x24')]?_[_0xf21d('0x23')](_0xc023da[_0xf21d('0x1e')][_0xf21d('0x24')],function(_0x5a7822){return{'model':db[_0x5a7822[_0xf21d('0x25')]],'as':_0x5a7822['as'],'attributes':_0x5a7822['attributes'],'include':_0x5a7822[_0xf21d('0x24')]?_[_0xf21d('0x23')](_0x5a7822[_0xf21d('0x24')],function(_0x11fd81){return{'model':db[_0x11fd81[_0xf21d('0x25')]],'as':_0x11fd81['as'],'attributes':_0x11fd81[_0xf21d('0x21')],'include':_0x11fd81[_0xf21d('0x24')]?_[_0xf21d('0x23')](_0x11fd81['include'],function(_0x2ab986){return{'model':db[_0x2ab986[_0xf21d('0x25')]],'as':_0x2ab986['as'],'attributes':_0x2ab986[_0xf21d('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4e5e50){logger[_0xf21d('0x11')]('ShowOpenchannelQueue',_0xc023da);logger[_0xf21d('0x14')](_0xf21d('0x26'),_0xc023da,JSON['stringify'](_0x4e5e50));_0x5f68c7(_0x4e5e50);})[_0xf21d('0x1a')](function(_0x100f35){logger[_0xf21d('0x17')]('ShowOpenchannelQueue',_0x100f35[_0xf21d('0x19')],_0xc023da);_0x44f9dd(_0x8d0cdf[_0xf21d('0x17')](0x1f4,_0x100f35['message']));});});};
\ No newline at end of file
+var _0x6cd2=['./openchannelQueue.socket','request','then','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','OpenchannelQueue,\x20%s,\x20%s','message','info','request\x20sent','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','include','map','model','attributes','stringify','ShowOpenchannelQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x21abb8,_0x5aa081){var _0xc4bc19=function(_0x26b1ae){while(--_0x26b1ae){_0x21abb8['push'](_0x21abb8['shift']());}};_0xc4bc19(++_0x5aa081);}(_0x6cd2,0x1e8));var _0x26cd=function(_0x3b717f,_0x2f7f66){_0x3b717f=_0x3b717f-0x0;var _0xbd14e5=_0x6cd2[_0x3b717f];return _0xbd14e5;};'use strict';var _=require(_0x26cd('0x0'));var util=require(_0x26cd('0x1'));var moment=require(_0x26cd('0x2'));var BPromise=require(_0x26cd('0x3'));var rs=require(_0x26cd('0x4'));var fs=require('fs');var Redis=require(_0x26cd('0x5'));var db=require(_0x26cd('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x26cd('0x7'))(_0x26cd('0x8'));var config=require(_0x26cd('0x9'));var jayson=require(_0x26cd('0xa'));var client=jayson[_0x26cd('0xb')][_0x26cd('0xc')]({'port':0x232a});config[_0x26cd('0xd')]=_['defaults'](config[_0x26cd('0xd')],{'host':_0x26cd('0xe'),'port':0x18eb});var socket=require(_0x26cd('0xf'))(new Redis(config[_0x26cd('0xd')]));require(_0x26cd('0x10'))['register'](socket);function respondWithRpcPromise(_0x506b63,_0x4d6c71,_0x5159c7){return new BPromise(function(_0x4fb561,_0x112aec){return client[_0x26cd('0x11')](_0x506b63,_0x5159c7)[_0x26cd('0x12')](function(_0x3cbc8e){logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x4d6c71,'request\x20sent');logger[_0x26cd('0x13')](_0x26cd('0x14'),_0x4d6c71,'request\x20sent',JSON['stringify'](_0x3cbc8e));if(_0x3cbc8e[_0x26cd('0x15')]){if(_0x3cbc8e[_0x26cd('0x15')][_0x26cd('0x16')]===0x1f4){logger['error'](_0x26cd('0x17'),_0x4d6c71,_0x3cbc8e['error'][_0x26cd('0x18')]);return _0x112aec(_0x3cbc8e[_0x26cd('0x15')]['message']);}logger['error'](_0x26cd('0x17'),_0x4d6c71,_0x3cbc8e['error'][_0x26cd('0x18')]);return _0x4fb561(_0x3cbc8e[_0x26cd('0x15')][_0x26cd('0x18')]);}else{logger[_0x26cd('0x19')](_0x26cd('0x17'),_0x4d6c71,_0x26cd('0x1a'));_0x4fb561(_0x3cbc8e[_0x26cd('0x1b')][_0x26cd('0x18')]);}})[_0x26cd('0x1c')](function(_0x3def04){logger[_0x26cd('0x15')](_0x26cd('0x17'),_0x4d6c71,_0x3def04);_0x112aec(_0x3def04);});});}exports[_0x26cd('0x1d')]=function(_0x2f28a6){var _0x2d2cf3=this;return new Promise(function(_0x58af2f,_0x54a510){return db[_0x26cd('0x1e')][_0x26cd('0x1f')]({'raw':_0x2f28a6[_0x26cd('0x20')]?_0x2f28a6[_0x26cd('0x20')][_0x26cd('0x21')]===undefined?!![]:![]:!![],'where':_0x2f28a6['options']?_0x2f28a6[_0x26cd('0x20')][_0x26cd('0x22')]||null:null,'attributes':_0x2f28a6['options']?_0x2f28a6['options']['attributes']||null:null,'limit':_0x2f28a6[_0x26cd('0x20')]?_0x2f28a6[_0x26cd('0x20')]['limit']||null:null,'include':_0x2f28a6[_0x26cd('0x20')]?_0x2f28a6['options'][_0x26cd('0x23')]?_[_0x26cd('0x24')](_0x2f28a6['options'][_0x26cd('0x23')],function(_0x3db9f2){return{'model':db[_0x3db9f2[_0x26cd('0x25')]],'as':_0x3db9f2['as'],'attributes':_0x3db9f2[_0x26cd('0x26')],'include':_0x3db9f2[_0x26cd('0x23')]?_[_0x26cd('0x24')](_0x3db9f2[_0x26cd('0x23')],function(_0x1a2525){return{'model':db[_0x1a2525[_0x26cd('0x25')]],'as':_0x1a2525['as'],'attributes':_0x1a2525[_0x26cd('0x26')],'include':_0x1a2525[_0x26cd('0x23')]?_[_0x26cd('0x24')](_0x1a2525[_0x26cd('0x23')],function(_0x48f958){return{'model':db[_0x48f958[_0x26cd('0x25')]],'as':_0x48f958['as'],'attributes':_0x48f958[_0x26cd('0x26')]};}):[]};}):[]};}):[]:[]})[_0x26cd('0x12')](function(_0xd3d3e5){logger['info']('GetOpenchannelQueue',_0x2f28a6);logger[_0x26cd('0x13')](_0x26cd('0x1d'),_0x2f28a6,JSON[_0x26cd('0x27')](_0xd3d3e5));_0x58af2f(_0xd3d3e5);})[_0x26cd('0x1c')](function(_0x18263b){logger[_0x26cd('0x15')](_0x26cd('0x1d'),_0x18263b[_0x26cd('0x18')],_0x2f28a6);_0x54a510(_0x2d2cf3[_0x26cd('0x15')](0x1f4,_0x18263b['message']));});});};exports[_0x26cd('0x28')]=function(_0xc49fff){var _0x279b4a=this;return new Promise(function(_0x4662d4,_0x5043e1){return db[_0x26cd('0x1e')][_0x26cd('0x29')]({'raw':_0xc49fff[_0x26cd('0x20')]?_0xc49fff['options']['raw']===undefined?!![]:![]:!![],'where':_0xc49fff[_0x26cd('0x20')]?_0xc49fff['options']['where']||null:null,'attributes':_0xc49fff[_0x26cd('0x20')]?_0xc49fff[_0x26cd('0x20')][_0x26cd('0x26')]||null:null,'include':_0xc49fff[_0x26cd('0x20')]?_0xc49fff[_0x26cd('0x20')][_0x26cd('0x23')]?_[_0x26cd('0x24')](_0xc49fff[_0x26cd('0x20')][_0x26cd('0x23')],function(_0x8bbf3){return{'model':db[_0x8bbf3[_0x26cd('0x25')]],'as':_0x8bbf3['as'],'attributes':_0x8bbf3['attributes'],'include':_0x8bbf3[_0x26cd('0x23')]?_[_0x26cd('0x24')](_0x8bbf3[_0x26cd('0x23')],function(_0x10ea19){return{'model':db[_0x10ea19['model']],'as':_0x10ea19['as'],'attributes':_0x10ea19[_0x26cd('0x26')],'include':_0x10ea19[_0x26cd('0x23')]?_[_0x26cd('0x24')](_0x10ea19[_0x26cd('0x23')],function(_0x450702){return{'model':db[_0x450702[_0x26cd('0x25')]],'as':_0x450702['as'],'attributes':_0x450702[_0x26cd('0x26')]};}):[]};}):[]};}):[]:[]})[_0x26cd('0x12')](function(_0x115b4a){logger[_0x26cd('0x19')]('ShowOpenchannelQueue',_0xc49fff);logger[_0x26cd('0x13')]('ShowOpenchannelQueue',_0xc49fff,JSON[_0x26cd('0x27')](_0x115b4a));_0x4662d4(_0x115b4a);})['catch'](function(_0x508ba5){logger[_0x26cd('0x15')](_0x26cd('0x28'),_0x508ba5[_0x26cd('0x18')],_0xc49fff);_0x5043e1(_0x279b4a[_0x26cd('0x15')](0x1f4,_0x508ba5['message']));});});};
\ No newline at end of file