Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 53c1a5f..4e4ce2f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9987=['options','limit','include','model','map','attributes','stringify','find','raw','ShowOpenchannelQueue','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue'];(function(_0x4e64ad,_0x5cd843){var _0x48e2f9=function(_0x15944c){while(--_0x15944c){_0x4e64ad['push'](_0x4e64ad['shift']());}};_0x48e2f9(++_0x5cd843);}(_0x9987,0x11b));var _0x7998=function(_0x36d439,_0x3b96bc){_0x36d439=_0x36d439-0x0;var _0x2c7757=_0x9987[_0x36d439];return _0x2c7757;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7998('0x0'));var BPromise=require(_0x7998('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7998('0x2'))['db'];var utils=require(_0x7998('0x3'));var logger=require(_0x7998('0x4'))(_0x7998('0x5'));var config=require(_0x7998('0x6'));var jayson=require(_0x7998('0x7'));var client=jayson[_0x7998('0x8')][_0x7998('0x9')]({'port':0x232a});config[_0x7998('0xa')]=_[_0x7998('0xb')](config[_0x7998('0xa')],{'host':_0x7998('0xc'),'port':0x18eb});var socket=require(_0x7998('0xd'))(new Redis(config[_0x7998('0xa')]));require(_0x7998('0xe'))['register'](socket);function respondWithRpcPromise(_0x4ea10f,_0x560886,_0x234d59){return new BPromise(function(_0x4a8f40,_0x3f57aa){return client[_0x7998('0xf')](_0x4ea10f,_0x234d59)[_0x7998('0x10')](function(_0x1b8728){logger[_0x7998('0x11')](_0x7998('0x12'),_0x560886,_0x7998('0x13'));logger[_0x7998('0x14')](_0x7998('0x15'),_0x560886,'request\x20sent',JSON['stringify'](_0x1b8728));if(_0x1b8728[_0x7998('0x16')]){if(_0x1b8728[_0x7998('0x16')][_0x7998('0x17')]===0x1f4){logger[_0x7998('0x16')](_0x7998('0x12'),_0x560886,_0x1b8728[_0x7998('0x16')][_0x7998('0x18')]);return _0x3f57aa(_0x1b8728[_0x7998('0x16')][_0x7998('0x18')]);}logger[_0x7998('0x16')](_0x7998('0x12'),_0x560886,_0x1b8728[_0x7998('0x16')][_0x7998('0x18')]);return _0x4a8f40(_0x1b8728[_0x7998('0x16')]['message']);}else{logger['info'](_0x7998('0x12'),_0x560886,_0x7998('0x13'));_0x4a8f40(_0x1b8728[_0x7998('0x19')][_0x7998('0x18')]);}})[_0x7998('0x1a')](function(_0x1b8d8a){logger['error'](_0x7998('0x12'),_0x560886,_0x1b8d8a);_0x3f57aa(_0x1b8d8a);});});}exports[_0x7998('0x1b')]=function(_0x19f0a0){var _0x3f29a1=this;return new Promise(function(_0x56ffbc,_0x35972f){return db[_0x7998('0x1c')]['findAll']({'raw':_0x19f0a0['options']?_0x19f0a0[_0x7998('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x19f0a0[_0x7998('0x1d')]?_0x19f0a0[_0x7998('0x1d')]['where']||null:null,'attributes':_0x19f0a0[_0x7998('0x1d')]?_0x19f0a0['options']['attributes']||null:null,'limit':_0x19f0a0[_0x7998('0x1d')]?_0x19f0a0[_0x7998('0x1d')][_0x7998('0x1e')]||null:null,'include':_0x19f0a0['options']?_0x19f0a0[_0x7998('0x1d')][_0x7998('0x1f')]?_['map'](_0x19f0a0['options'][_0x7998('0x1f')],function(_0x54bc9d){return{'model':db[_0x54bc9d[_0x7998('0x20')]],'as':_0x54bc9d['as'],'attributes':_0x54bc9d['attributes'],'include':_0x54bc9d[_0x7998('0x1f')]?_[_0x7998('0x21')](_0x54bc9d[_0x7998('0x1f')],function(_0x3bd15e){return{'model':db[_0x3bd15e[_0x7998('0x20')]],'as':_0x3bd15e['as'],'attributes':_0x3bd15e[_0x7998('0x22')],'include':_0x3bd15e[_0x7998('0x1f')]?_['map'](_0x3bd15e[_0x7998('0x1f')],function(_0x571b1b){return{'model':db[_0x571b1b[_0x7998('0x20')]],'as':_0x571b1b['as'],'attributes':_0x571b1b[_0x7998('0x22')]};}):[]};}):[]};}):[]:[]})[_0x7998('0x10')](function(_0x2ec2e5){logger[_0x7998('0x11')](_0x7998('0x1b'),_0x19f0a0);logger[_0x7998('0x14')]('GetOpenchannelQueue',_0x19f0a0,JSON[_0x7998('0x23')](_0x2ec2e5));_0x56ffbc(_0x2ec2e5);})[_0x7998('0x1a')](function(_0x2a2167){logger['error'](_0x7998('0x1b'),_0x2a2167[_0x7998('0x18')],_0x19f0a0);_0x35972f(_0x3f29a1[_0x7998('0x16')](0x1f4,_0x2a2167['message']));});});};exports['ShowOpenchannelQueue']=function(_0x515fcc){var _0xe3259b=this;return new Promise(function(_0x4cefb3,_0x2697d0){return db['OpenchannelQueue'][_0x7998('0x24')]({'raw':_0x515fcc[_0x7998('0x1d')]?_0x515fcc[_0x7998('0x1d')][_0x7998('0x25')]===undefined?!![]:![]:!![],'where':_0x515fcc['options']?_0x515fcc[_0x7998('0x1d')]['where']||null:null,'attributes':_0x515fcc['options']?_0x515fcc[_0x7998('0x1d')]['attributes']||null:null,'include':_0x515fcc['options']?_0x515fcc[_0x7998('0x1d')][_0x7998('0x1f')]?_['map'](_0x515fcc['options'][_0x7998('0x1f')],function(_0x8844f9){return{'model':db[_0x8844f9['model']],'as':_0x8844f9['as'],'attributes':_0x8844f9['attributes'],'include':_0x8844f9['include']?_[_0x7998('0x21')](_0x8844f9[_0x7998('0x1f')],function(_0x11635d){return{'model':db[_0x11635d['model']],'as':_0x11635d['as'],'attributes':_0x11635d[_0x7998('0x22')],'include':_0x11635d['include']?_['map'](_0x11635d[_0x7998('0x1f')],function(_0x5dabe1){return{'model':db[_0x5dabe1[_0x7998('0x20')]],'as':_0x5dabe1['as'],'attributes':_0x5dabe1[_0x7998('0x22')]};}):[]};}):[]};}):[]:[]})[_0x7998('0x10')](function(_0x41b896){logger[_0x7998('0x11')](_0x7998('0x26'),_0x515fcc);logger[_0x7998('0x14')](_0x7998('0x26'),_0x515fcc,JSON[_0x7998('0x23')](_0x41b896));_0x4cefb3(_0x41b896);})['catch'](function(_0x2ac9c4){logger[_0x7998('0x16')](_0x7998('0x26'),_0x2ac9c4[_0x7998('0x18')],_0x515fcc);_0x2697d0(_0xe3259b[_0x7998('0x16')](0x1f4,_0x2ac9c4['message']));});});};
\ No newline at end of file
+var _0x6273=['info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetOpenchannelQueue','findAll','options','raw','where','attributes','include','model','map','debug','ShowOpenchannelQueue','OpenchannelQueue','find','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','then'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x6273,0x174));var _0x3627=function(_0x59147a,_0x45f12c){_0x59147a=_0x59147a-0x0;var _0x1970b7=_0x6273[_0x59147a];return _0x1970b7;};'use strict';var _=require(_0x3627('0x0'));var util=require('util');var moment=require(_0x3627('0x1'));var BPromise=require(_0x3627('0x2'));var rs=require(_0x3627('0x3'));var fs=require('fs');var Redis=require(_0x3627('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x3627('0x5'));var logger=require(_0x3627('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3627('0x7'));var client=jayson[_0x3627('0x8')][_0x3627('0x9')]({'port':0x232a});config[_0x3627('0xa')]=_[_0x3627('0xb')](config[_0x3627('0xa')],{'host':_0x3627('0xc'),'port':0x18eb});var socket=require(_0x3627('0xd'))(new Redis(config['redis']));require(_0x3627('0xe'))[_0x3627('0xf')](socket);function respondWithRpcPromise(_0x392191,_0x29aedc,_0x7c2af2){return new BPromise(function(_0x4962a3,_0xda749d){return client[_0x3627('0x10')](_0x392191,_0x7c2af2)[_0x3627('0x11')](function(_0x211910){logger[_0x3627('0x12')](_0x3627('0x13'),_0x29aedc,_0x3627('0x14'));logger['debug'](_0x3627('0x15'),_0x29aedc,_0x3627('0x14'),JSON[_0x3627('0x16')](_0x211910));if(_0x211910[_0x3627('0x17')]){if(_0x211910[_0x3627('0x17')]['code']===0x1f4){logger[_0x3627('0x17')](_0x3627('0x13'),_0x29aedc,_0x211910[_0x3627('0x17')][_0x3627('0x18')]);return _0xda749d(_0x211910[_0x3627('0x17')]['message']);}logger[_0x3627('0x17')](_0x3627('0x13'),_0x29aedc,_0x211910[_0x3627('0x17')][_0x3627('0x18')]);return _0x4962a3(_0x211910['error'][_0x3627('0x18')]);}else{logger[_0x3627('0x12')](_0x3627('0x13'),_0x29aedc,_0x3627('0x14'));_0x4962a3(_0x211910['result'][_0x3627('0x18')]);}})[_0x3627('0x19')](function(_0x3ed1d9){logger[_0x3627('0x17')](_0x3627('0x13'),_0x29aedc,_0x3ed1d9);_0xda749d(_0x3ed1d9);});});}exports[_0x3627('0x1a')]=function(_0xf527c7){var _0x432318=this;return new Promise(function(_0x572b10,_0x3e0815){return db['OpenchannelQueue'][_0x3627('0x1b')]({'raw':_0xf527c7[_0x3627('0x1c')]?_0xf527c7[_0x3627('0x1c')][_0x3627('0x1d')]===undefined?!![]:![]:!![],'where':_0xf527c7[_0x3627('0x1c')]?_0xf527c7[_0x3627('0x1c')][_0x3627('0x1e')]||null:null,'attributes':_0xf527c7[_0x3627('0x1c')]?_0xf527c7['options'][_0x3627('0x1f')]||null:null,'limit':_0xf527c7[_0x3627('0x1c')]?_0xf527c7['options']['limit']||null:null,'include':_0xf527c7['options']?_0xf527c7['options'][_0x3627('0x20')]?_['map'](_0xf527c7[_0x3627('0x1c')][_0x3627('0x20')],function(_0x391a25){return{'model':db[_0x391a25[_0x3627('0x21')]],'as':_0x391a25['as'],'attributes':_0x391a25[_0x3627('0x1f')],'include':_0x391a25[_0x3627('0x20')]?_[_0x3627('0x22')](_0x391a25['include'],function(_0x262cea){return{'model':db[_0x262cea[_0x3627('0x21')]],'as':_0x262cea['as'],'attributes':_0x262cea['attributes'],'include':_0x262cea[_0x3627('0x20')]?_[_0x3627('0x22')](_0x262cea[_0x3627('0x20')],function(_0x17a3db){return{'model':db[_0x17a3db[_0x3627('0x21')]],'as':_0x17a3db['as'],'attributes':_0x17a3db['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2903aa){logger[_0x3627('0x12')](_0x3627('0x1a'),_0xf527c7);logger[_0x3627('0x23')]('GetOpenchannelQueue',_0xf527c7,JSON[_0x3627('0x16')](_0x2903aa));_0x572b10(_0x2903aa);})[_0x3627('0x19')](function(_0x4b0144){logger[_0x3627('0x17')](_0x3627('0x1a'),_0x4b0144[_0x3627('0x18')],_0xf527c7);_0x3e0815(_0x432318['error'](0x1f4,_0x4b0144[_0x3627('0x18')]));});});};exports[_0x3627('0x24')]=function(_0xa2667e){var _0x5bfae5=this;return new Promise(function(_0x43a2e6,_0x3aa4e9){return db[_0x3627('0x25')][_0x3627('0x26')]({'raw':_0xa2667e[_0x3627('0x1c')]?_0xa2667e[_0x3627('0x1c')][_0x3627('0x1d')]===undefined?!![]:![]:!![],'where':_0xa2667e['options']?_0xa2667e[_0x3627('0x1c')][_0x3627('0x1e')]||null:null,'attributes':_0xa2667e[_0x3627('0x1c')]?_0xa2667e['options'][_0x3627('0x1f')]||null:null,'include':_0xa2667e[_0x3627('0x1c')]?_0xa2667e['options'][_0x3627('0x20')]?_[_0x3627('0x22')](_0xa2667e[_0x3627('0x1c')]['include'],function(_0xab9372){return{'model':db[_0xab9372[_0x3627('0x21')]],'as':_0xab9372['as'],'attributes':_0xab9372[_0x3627('0x1f')],'include':_0xab9372['include']?_[_0x3627('0x22')](_0xab9372['include'],function(_0x2e11fc){return{'model':db[_0x2e11fc[_0x3627('0x21')]],'as':_0x2e11fc['as'],'attributes':_0x2e11fc[_0x3627('0x1f')],'include':_0x2e11fc[_0x3627('0x20')]?_[_0x3627('0x22')](_0x2e11fc[_0x3627('0x20')],function(_0x42dadf){return{'model':db[_0x42dadf[_0x3627('0x21')]],'as':_0x42dadf['as'],'attributes':_0x42dadf['attributes']};}):[]};}):[]};}):[]:[]})[_0x3627('0x11')](function(_0x4c7b73){logger[_0x3627('0x12')](_0x3627('0x24'),_0xa2667e);logger['debug'](_0x3627('0x24'),_0xa2667e,JSON[_0x3627('0x16')](_0x4c7b73));_0x43a2e6(_0x4c7b73);})[_0x3627('0x19')](function(_0x5ec456){logger[_0x3627('0x17')]('ShowOpenchannelQueue',_0x5ec456[_0x3627('0x18')],_0xa2667e);_0x3aa4e9(_0x5bfae5[_0x3627('0x17')](0x1f4,_0x5ec456['message']));});});};
\ No newline at end of file