Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 764fc89..3ff2609 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a96=['localhost','./openchannelQueue.socket','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelQueue,\x20%s,\x20%s','message','result','catch','OpenchannelQueue','options','raw','where','limit','map','model','attributes','include','GetOpenchannelQueue','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','redis'];(function(_0xe70390,_0x916157){var _0x36b28f=function(_0x559e2d){while(--_0x559e2d){_0xe70390['push'](_0xe70390['shift']());}};_0x36b28f(++_0x916157);}(_0x4a96,0x88));var _0x64a9=function(_0x5bb4a,_0xfb4035){_0x5bb4a=_0x5bb4a-0x0;var _0x5d0b0c=_0x4a96[_0x5bb4a];return _0x5d0b0c;};'use strict';var _=require(_0x64a9('0x0'));var util=require(_0x64a9('0x1'));var moment=require(_0x64a9('0x2'));var BPromise=require(_0x64a9('0x3'));var rs=require(_0x64a9('0x4'));var fs=require('fs');var Redis=require(_0x64a9('0x5'));var db=require(_0x64a9('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x64a9('0x7'));var jayson=require(_0x64a9('0x8'));var client=jayson[_0x64a9('0x9')][_0x64a9('0xa')]({'port':0x232a});config[_0x64a9('0xb')]=_['defaults'](config[_0x64a9('0xb')],{'host':_0x64a9('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x64a9('0xd'))['register'](socket);function respondWithRpcPromise(_0x3f30b2,_0x57d00c,_0x5bdf76){return new BPromise(function(_0x1b6af5,_0x2965d0){return client[_0x64a9('0xe')](_0x3f30b2,_0x5bdf76)[_0x64a9('0xf')](function(_0x2454e8){logger[_0x64a9('0x10')]('OpenchannelQueue,\x20%s,\x20%s',_0x57d00c,_0x64a9('0x11'));logger[_0x64a9('0x12')](_0x64a9('0x13'),_0x57d00c,_0x64a9('0x11'),JSON[_0x64a9('0x14')](_0x2454e8));if(_0x2454e8[_0x64a9('0x15')]){if(_0x2454e8[_0x64a9('0x15')]['code']===0x1f4){logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x2454e8[_0x64a9('0x15')][_0x64a9('0x17')]);return _0x2965d0(_0x2454e8[_0x64a9('0x15')][_0x64a9('0x17')]);}logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x2454e8['error'][_0x64a9('0x17')]);return _0x1b6af5(_0x2454e8['error'][_0x64a9('0x17')]);}else{logger['info'](_0x64a9('0x16'),_0x57d00c,_0x64a9('0x11'));_0x1b6af5(_0x2454e8[_0x64a9('0x18')][_0x64a9('0x17')]);}})[_0x64a9('0x19')](function(_0x14313e){logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x14313e);_0x2965d0(_0x14313e);});});}exports['GetOpenchannelQueue']=function(_0x3ef0b0){var _0x49023a=this;return new Promise(function(_0x15acf9,_0xe941bc){return db[_0x64a9('0x1a')]['findAll']({'raw':_0x3ef0b0['options']?_0x3ef0b0[_0x64a9('0x1b')][_0x64a9('0x1c')]===undefined?!![]:![]:!![],'where':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0[_0x64a9('0x1b')][_0x64a9('0x1d')]||null:null,'attributes':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0[_0x64a9('0x1b')]['attributes']||null:null,'limit':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0['options'][_0x64a9('0x1e')]||null:null,'include':_0x3ef0b0['options']?_0x3ef0b0[_0x64a9('0x1b')]['include']?_[_0x64a9('0x1f')](_0x3ef0b0[_0x64a9('0x1b')]['include'],function(_0x5c0d62){return{'model':db[_0x5c0d62[_0x64a9('0x20')]],'as':_0x5c0d62['as'],'attributes':_0x5c0d62[_0x64a9('0x21')],'include':_0x5c0d62[_0x64a9('0x22')]?_['map'](_0x5c0d62[_0x64a9('0x22')],function(_0x98f7a0){return{'model':db[_0x98f7a0[_0x64a9('0x20')]],'as':_0x98f7a0['as'],'attributes':_0x98f7a0[_0x64a9('0x21')],'include':_0x98f7a0['include']?_[_0x64a9('0x1f')](_0x98f7a0[_0x64a9('0x22')],function(_0x33b35b){return{'model':db[_0x33b35b['model']],'as':_0x33b35b['as'],'attributes':_0x33b35b[_0x64a9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x64a9('0xf')](function(_0x5f4772){logger['info']('GetOpenchannelQueue',_0x3ef0b0);logger[_0x64a9('0x12')](_0x64a9('0x23'),_0x3ef0b0,JSON['stringify'](_0x5f4772));_0x15acf9(_0x5f4772);})[_0x64a9('0x19')](function(_0x22eeec){logger['error'](_0x64a9('0x23'),_0x22eeec['message'],_0x3ef0b0);_0xe941bc(_0x49023a[_0x64a9('0x15')](0x1f4,_0x22eeec[_0x64a9('0x17')]));});});};exports[_0x64a9('0x24')]=function(_0x49fd9f){var _0x4f32ef=this;return new Promise(function(_0x567a76,_0x5d1fbc){return db[_0x64a9('0x1a')]['find']({'raw':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f['options'][_0x64a9('0x1c')]===undefined?!![]:![]:!![],'where':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x1d')]||null:null,'attributes':_0x49fd9f['options']?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x21')]||null:null,'include':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x22')]?_[_0x64a9('0x1f')](_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x22')],function(_0x18c5a0){return{'model':db[_0x18c5a0['model']],'as':_0x18c5a0['as'],'attributes':_0x18c5a0[_0x64a9('0x21')],'include':_0x18c5a0[_0x64a9('0x22')]?_[_0x64a9('0x1f')](_0x18c5a0[_0x64a9('0x22')],function(_0x5e1399){return{'model':db[_0x5e1399[_0x64a9('0x20')]],'as':_0x5e1399['as'],'attributes':_0x5e1399[_0x64a9('0x21')],'include':_0x5e1399[_0x64a9('0x22')]?_['map'](_0x5e1399[_0x64a9('0x22')],function(_0x484ecd){return{'model':db[_0x484ecd[_0x64a9('0x20')]],'as':_0x484ecd['as'],'attributes':_0x484ecd[_0x64a9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x64a9('0xf')](function(_0x5ecf17){logger['info']('ShowOpenchannelQueue',_0x49fd9f);logger[_0x64a9('0x12')](_0x64a9('0x24'),_0x49fd9f,JSON['stringify'](_0x5ecf17));_0x567a76(_0x5ecf17);})[_0x64a9('0x19')](function(_0x206db2){logger[_0x64a9('0x15')](_0x64a9('0x24'),_0x206db2[_0x64a9('0x17')],_0x49fd9f);_0x5d1fbc(_0x4f32ef[_0x64a9('0x15')](0x1f4,_0x206db2[_0x64a9('0x17')]));});});};
\ No newline at end of file
+var _0xac5a=['find','raw','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','where','attributes','limit','include','map','model','ShowOpenchannelQueue'];(function(_0x2e0482,_0x1ffe16){var _0x3636e1=function(_0x14c95b){while(--_0x14c95b){_0x2e0482['push'](_0x2e0482['shift']());}};_0x3636e1(++_0x1ffe16);}(_0xac5a,0x192));var _0xaac5=function(_0x545bed,_0x221e96){_0x545bed=_0x545bed-0x0;var _0x16c79c=_0xac5a[_0x545bed];return _0x16c79c;};'use strict';var _=require('lodash');var util=require(_0xaac5('0x0'));var moment=require(_0xaac5('0x1'));var BPromise=require(_0xaac5('0x2'));var rs=require(_0xaac5('0x3'));var fs=require('fs');var Redis=require(_0xaac5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xaac5('0x5'));var logger=require(_0xaac5('0x6'))(_0xaac5('0x7'));var config=require(_0xaac5('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xaac5('0x9')][_0xaac5('0xa')]({'port':0x232a});config[_0xaac5('0xb')]=_['defaults'](config[_0xaac5('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xaac5('0xb')]));require(_0xaac5('0xc'))[_0xaac5('0xd')](socket);function respondWithRpcPromise(_0x1fe214,_0x304196,_0xa74974){return new BPromise(function(_0x14d328,_0xe433ea){return client[_0xaac5('0xe')](_0x1fe214,_0xa74974)[_0xaac5('0xf')](function(_0x23393e){logger[_0xaac5('0x10')](_0xaac5('0x11'),_0x304196,_0xaac5('0x12'));logger[_0xaac5('0x13')](_0xaac5('0x14'),_0x304196,_0xaac5('0x12'),JSON[_0xaac5('0x15')](_0x23393e));if(_0x23393e[_0xaac5('0x16')]){if(_0x23393e[_0xaac5('0x16')][_0xaac5('0x17')]===0x1f4){logger['error'](_0xaac5('0x11'),_0x304196,_0x23393e[_0xaac5('0x16')][_0xaac5('0x18')]);return _0xe433ea(_0x23393e[_0xaac5('0x16')]['message']);}logger['error'](_0xaac5('0x11'),_0x304196,_0x23393e[_0xaac5('0x16')][_0xaac5('0x18')]);return _0x14d328(_0x23393e[_0xaac5('0x16')]['message']);}else{logger[_0xaac5('0x10')](_0xaac5('0x11'),_0x304196,_0xaac5('0x12'));_0x14d328(_0x23393e[_0xaac5('0x19')][_0xaac5('0x18')]);}})[_0xaac5('0x1a')](function(_0x411ec7){logger[_0xaac5('0x16')](_0xaac5('0x11'),_0x304196,_0x411ec7);_0xe433ea(_0x411ec7);});});}exports[_0xaac5('0x1b')]=function(_0x59ec83){var _0x401116=this;return new Promise(function(_0x5aa620,_0x2e4516){return db[_0xaac5('0x1c')][_0xaac5('0x1d')]({'raw':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x59ec83['options']?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x1f')]||null:null,'attributes':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x20')]||null:null,'limit':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x21')]||null:null,'include':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83['options'][_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x22')],function(_0x3a4a2f){return{'model':db[_0x3a4a2f[_0xaac5('0x24')]],'as':_0x3a4a2f['as'],'attributes':_0x3a4a2f['attributes'],'include':_0x3a4a2f[_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x3a4a2f['include'],function(_0x2a0e61){return{'model':db[_0x2a0e61[_0xaac5('0x24')]],'as':_0x2a0e61['as'],'attributes':_0x2a0e61[_0xaac5('0x20')],'include':_0x2a0e61[_0xaac5('0x22')]?_['map'](_0x2a0e61[_0xaac5('0x22')],function(_0x343034){return{'model':db[_0x343034[_0xaac5('0x24')]],'as':_0x343034['as'],'attributes':_0x343034[_0xaac5('0x20')]};}):[]};}):[]};}):[]:[]})[_0xaac5('0xf')](function(_0x35f9c0){logger[_0xaac5('0x10')](_0xaac5('0x1b'),_0x59ec83);logger[_0xaac5('0x13')](_0xaac5('0x1b'),_0x59ec83,JSON[_0xaac5('0x15')](_0x35f9c0));_0x5aa620(_0x35f9c0);})['catch'](function(_0x9ad569){logger[_0xaac5('0x16')](_0xaac5('0x1b'),_0x9ad569[_0xaac5('0x18')],_0x59ec83);_0x2e4516(_0x401116[_0xaac5('0x16')](0x1f4,_0x9ad569[_0xaac5('0x18')]));});});};exports[_0xaac5('0x25')]=function(_0x4003ce){var _0x4bd6ff=this;return new Promise(function(_0x2cc73d,_0x1a6445){return db[_0xaac5('0x1c')][_0xaac5('0x26')]({'raw':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce['options'][_0xaac5('0x27')]===undefined?!![]:![]:!![],'where':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x1f')]||null:null,'attributes':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x20')]||null:null,'include':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x22')],function(_0x9cbd65){return{'model':db[_0x9cbd65[_0xaac5('0x24')]],'as':_0x9cbd65['as'],'attributes':_0x9cbd65['attributes'],'include':_0x9cbd65[_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x9cbd65[_0xaac5('0x22')],function(_0x85115d){return{'model':db[_0x85115d[_0xaac5('0x24')]],'as':_0x85115d['as'],'attributes':_0x85115d['attributes'],'include':_0x85115d['include']?_[_0xaac5('0x23')](_0x85115d['include'],function(_0x124f8b){return{'model':db[_0x124f8b['model']],'as':_0x124f8b['as'],'attributes':_0x124f8b[_0xaac5('0x20')]};}):[]};}):[]};}):[]:[]})[_0xaac5('0xf')](function(_0x186cc0){logger[_0xaac5('0x10')](_0xaac5('0x25'),_0x4003ce);logger[_0xaac5('0x13')](_0xaac5('0x25'),_0x4003ce,JSON[_0xaac5('0x15')](_0x186cc0));_0x2cc73d(_0x186cc0);})[_0xaac5('0x1a')](function(_0x5abe7c){logger[_0xaac5('0x16')](_0xaac5('0x25'),_0x5abe7c[_0xaac5('0x18')],_0x4003ce);_0x1a6445(_0x4bd6ff[_0xaac5('0x16')](0x1f4,_0x5abe7c[_0xaac5('0x18')]));});});};
\ No newline at end of file