Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 78f1091..3ff2609 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','then','info','OpenchannelQueue,\x20%s,\x20%s','debug','request\x20sent','error','code','message','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','where','attributes','limit','map','include','model','stringify','ShowOpenchannelQueue','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x3448bc,_0x1a4b7d){var _0x100b26=function(_0x38b02b){while(--_0x38b02b){_0x3448bc['push'](_0x3448bc['shift']());}};_0x100b26(++_0x1a4b7d);}(_0xe706,0x186));var _0x6e70=function(_0x3b07d7,_0x374e44){_0x3b07d7=_0x3b07d7-0x0;var _0x2a9b53=_0xe706[_0x3b07d7];return _0x2a9b53;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var moment=require('moment');var BPromise=require(_0x6e70('0x2'));var rs=require(_0x6e70('0x3'));var fs=require('fs');var Redis=require(_0x6e70('0x4'));var db=require(_0x6e70('0x5'))['db'];var utils=require(_0x6e70('0x6'));var logger=require(_0x6e70('0x7'))(_0x6e70('0x8'));var config=require(_0x6e70('0x9'));var jayson=require(_0x6e70('0xa'));var client=jayson[_0x6e70('0xb')][_0x6e70('0xc')]({'port':0x232a});config[_0x6e70('0xd')]=_[_0x6e70('0xe')](config['redis'],{'host':_0x6e70('0xf'),'port':0x18eb});var socket=require(_0x6e70('0x10'))(new Redis(config[_0x6e70('0xd')]));require(_0x6e70('0x11'))['register'](socket);function respondWithRpcPromise(_0x29e12,_0x56d824,_0x537f19){return new BPromise(function(_0x379b8b,_0x5a49b5){return client['request'](_0x29e12,_0x537f19)[_0x6e70('0x12')](function(_0x351f0b){logger[_0x6e70('0x13')](_0x6e70('0x14'),_0x56d824,'request\x20sent');logger[_0x6e70('0x15')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x56d824,_0x6e70('0x16'),JSON['stringify'](_0x351f0b));if(_0x351f0b[_0x6e70('0x17')]){if(_0x351f0b['error'][_0x6e70('0x18')]===0x1f4){logger['error'](_0x6e70('0x14'),_0x56d824,_0x351f0b['error'][_0x6e70('0x19')]);return _0x5a49b5(_0x351f0b['error'][_0x6e70('0x19')]);}logger[_0x6e70('0x17')](_0x6e70('0x14'),_0x56d824,_0x351f0b[_0x6e70('0x17')][_0x6e70('0x19')]);return _0x379b8b(_0x351f0b[_0x6e70('0x17')]['message']);}else{logger['info'](_0x6e70('0x14'),_0x56d824,_0x6e70('0x16'));_0x379b8b(_0x351f0b['result'][_0x6e70('0x19')]);}})[_0x6e70('0x1a')](function(_0x4ab959){logger['error'](_0x6e70('0x14'),_0x56d824,_0x4ab959);_0x5a49b5(_0x4ab959);});});}exports[_0x6e70('0x1b')]=function(_0x103001){var _0xe8b2=this;return new Promise(function(_0x4f2545,_0x14545f){return db[_0x6e70('0x1c')][_0x6e70('0x1d')]({'raw':_0x103001['options']?_0x103001[_0x6e70('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x103001[_0x6e70('0x1e')]?_0x103001[_0x6e70('0x1e')][_0x6e70('0x1f')]||null:null,'attributes':_0x103001[_0x6e70('0x1e')]?_0x103001[_0x6e70('0x1e')][_0x6e70('0x20')]||null:null,'limit':_0x103001['options']?_0x103001[_0x6e70('0x1e')][_0x6e70('0x21')]||null:null,'include':_0x103001[_0x6e70('0x1e')]?_0x103001[_0x6e70('0x1e')]['include']?_[_0x6e70('0x22')](_0x103001[_0x6e70('0x1e')][_0x6e70('0x23')],function(_0x2474b0){return{'model':db[_0x2474b0[_0x6e70('0x24')]],'as':_0x2474b0['as'],'attributes':_0x2474b0[_0x6e70('0x20')],'include':_0x2474b0[_0x6e70('0x23')]?_[_0x6e70('0x22')](_0x2474b0[_0x6e70('0x23')],function(_0x14c43d){return{'model':db[_0x14c43d['model']],'as':_0x14c43d['as'],'attributes':_0x14c43d[_0x6e70('0x20')],'include':_0x14c43d['include']?_[_0x6e70('0x22')](_0x14c43d['include'],function(_0x37710f){return{'model':db[_0x37710f[_0x6e70('0x24')]],'as':_0x37710f['as'],'attributes':_0x37710f[_0x6e70('0x20')]};}):[]};}):[]};}):[]:[]})[_0x6e70('0x12')](function(_0x5cf9f4){logger[_0x6e70('0x13')]('GetOpenchannelQueue',_0x103001);logger[_0x6e70('0x15')](_0x6e70('0x1b'),_0x103001,JSON[_0x6e70('0x25')](_0x5cf9f4));_0x4f2545(_0x5cf9f4);})['catch'](function(_0x1cfbf2){logger[_0x6e70('0x17')]('GetOpenchannelQueue',_0x1cfbf2[_0x6e70('0x19')],_0x103001);_0x14545f(_0xe8b2[_0x6e70('0x17')](0x1f4,_0x1cfbf2['message']));});});};exports[_0x6e70('0x26')]=function(_0x108b6a){var _0x167507=this;return new Promise(function(_0x256dcb,_0xe22524){return db['OpenchannelQueue'][_0x6e70('0x27')]({'raw':_0x108b6a[_0x6e70('0x1e')]?_0x108b6a[_0x6e70('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x108b6a[_0x6e70('0x1e')]?_0x108b6a['options'][_0x6e70('0x1f')]||null:null,'attributes':_0x108b6a[_0x6e70('0x1e')]?_0x108b6a[_0x6e70('0x1e')][_0x6e70('0x20')]||null:null,'include':_0x108b6a[_0x6e70('0x1e')]?_0x108b6a[_0x6e70('0x1e')]['include']?_[_0x6e70('0x22')](_0x108b6a[_0x6e70('0x1e')][_0x6e70('0x23')],function(_0x4d466b){return{'model':db[_0x4d466b['model']],'as':_0x4d466b['as'],'attributes':_0x4d466b[_0x6e70('0x20')],'include':_0x4d466b[_0x6e70('0x23')]?_[_0x6e70('0x22')](_0x4d466b[_0x6e70('0x23')],function(_0x15b061){return{'model':db[_0x15b061[_0x6e70('0x24')]],'as':_0x15b061['as'],'attributes':_0x15b061[_0x6e70('0x20')],'include':_0x15b061[_0x6e70('0x23')]?_[_0x6e70('0x22')](_0x15b061['include'],function(_0x1bf2b4){return{'model':db[_0x1bf2b4[_0x6e70('0x24')]],'as':_0x1bf2b4['as'],'attributes':_0x1bf2b4[_0x6e70('0x20')]};}):[]};}):[]};}):[]:[]})[_0x6e70('0x12')](function(_0x4ddaa0){logger[_0x6e70('0x13')](_0x6e70('0x26'),_0x108b6a);logger[_0x6e70('0x15')](_0x6e70('0x26'),_0x108b6a,JSON['stringify'](_0x4ddaa0));_0x256dcb(_0x4ddaa0);})['catch'](function(_0x3b9720){logger['error']('ShowOpenchannelQueue',_0x3b9720['message'],_0x108b6a);_0xe22524(_0x167507[_0x6e70('0x17')](0x1f4,_0x3b9720[_0x6e70('0x19')]));});});};
\ 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