Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 7fa2f52..6cc9199 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a95=['OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','attributes','limit','include','map','model','then','catch','find','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./openchannelQueue.socket','register','request','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x5c6272,_0xd82df5){var _0x19c236=function(_0x332352){while(--_0x332352){_0x5c6272['push'](_0x5c6272['shift']());}};_0x19c236(++_0xd82df5);}(_0x7a95,0x95));var _0x57a9=function(_0x3c4c1b,_0x567fb1){_0x3c4c1b=_0x3c4c1b-0x0;var _0x1e0d7c=_0x7a95[_0x3c4c1b];return _0x1e0d7c;};'use strict';var _=require(_0x57a9('0x0'));var util=require(_0x57a9('0x1'));var moment=require(_0x57a9('0x2'));var BPromise=require(_0x57a9('0x3'));var rs=require(_0x57a9('0x4'));var fs=require('fs');var Redis=require(_0x57a9('0x5'));var db=require(_0x57a9('0x6'))['db'];var utils=require(_0x57a9('0x7'));var logger=require(_0x57a9('0x8'))(_0x57a9('0x9'));var config=require(_0x57a9('0xa'));var jayson=require(_0x57a9('0xb'));var client=jayson[_0x57a9('0xc')][_0x57a9('0xd')]({'port':0x232a});config[_0x57a9('0xe')]=_[_0x57a9('0xf')](config[_0x57a9('0xe')],{'host':_0x57a9('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x57a9('0xe')]));require(_0x57a9('0x11'))[_0x57a9('0x12')](socket);function respondWithRpcPromise(_0x15fc68,_0x3f617f,_0x34bf73){return new BPromise(function(_0x9a40bf,_0x4a3b6f){return client[_0x57a9('0x13')](_0x15fc68,_0x34bf73)['then'](function(_0x1c4d55){logger['info'](_0x57a9('0x14'),_0x3f617f,_0x57a9('0x15'));logger[_0x57a9('0x16')](_0x57a9('0x17'),_0x3f617f,_0x57a9('0x15'),JSON[_0x57a9('0x18')](_0x1c4d55));if(_0x1c4d55[_0x57a9('0x19')]){if(_0x1c4d55['error'][_0x57a9('0x1a')]===0x1f4){logger[_0x57a9('0x19')](_0x57a9('0x14'),_0x3f617f,_0x1c4d55[_0x57a9('0x19')][_0x57a9('0x1b')]);return _0x4a3b6f(_0x1c4d55[_0x57a9('0x19')][_0x57a9('0x1b')]);}logger['error'](_0x57a9('0x14'),_0x3f617f,_0x1c4d55[_0x57a9('0x19')][_0x57a9('0x1b')]);return _0x9a40bf(_0x1c4d55[_0x57a9('0x19')][_0x57a9('0x1b')]);}else{logger[_0x57a9('0x1c')]('OpenchannelQueue,\x20%s,\x20%s',_0x3f617f,_0x57a9('0x15'));_0x9a40bf(_0x1c4d55['result'][_0x57a9('0x1b')]);}})['catch'](function(_0x3dabe7){logger[_0x57a9('0x19')](_0x57a9('0x14'),_0x3f617f,_0x3dabe7);_0x4a3b6f(_0x3dabe7);});});}exports[_0x57a9('0x1d')]=function(_0x38ef9c){var _0x31136c=this;return new Promise(function(_0x348657,_0x58d1c0){return db[_0x57a9('0x1e')][_0x57a9('0x1f')]({'raw':_0x38ef9c[_0x57a9('0x20')]?_0x38ef9c[_0x57a9('0x20')][_0x57a9('0x21')]===undefined?!![]:![]:!![],'where':_0x38ef9c[_0x57a9('0x20')]?_0x38ef9c[_0x57a9('0x20')]['where']||null:null,'attributes':_0x38ef9c[_0x57a9('0x20')]?_0x38ef9c['options'][_0x57a9('0x22')]||null:null,'limit':_0x38ef9c['options']?_0x38ef9c[_0x57a9('0x20')][_0x57a9('0x23')]||null:null,'include':_0x38ef9c['options']?_0x38ef9c['options'][_0x57a9('0x24')]?_[_0x57a9('0x25')](_0x38ef9c['options'][_0x57a9('0x24')],function(_0x249279){return{'model':db[_0x249279[_0x57a9('0x26')]],'as':_0x249279['as'],'attributes':_0x249279[_0x57a9('0x22')],'include':_0x249279[_0x57a9('0x24')]?_['map'](_0x249279[_0x57a9('0x24')],function(_0x18d86d){return{'model':db[_0x18d86d[_0x57a9('0x26')]],'as':_0x18d86d['as'],'attributes':_0x18d86d[_0x57a9('0x22')],'include':_0x18d86d[_0x57a9('0x24')]?_[_0x57a9('0x25')](_0x18d86d[_0x57a9('0x24')],function(_0x33e3f1){return{'model':db[_0x33e3f1[_0x57a9('0x26')]],'as':_0x33e3f1['as'],'attributes':_0x33e3f1[_0x57a9('0x22')]};}):[]};}):[]};}):[]:[]})[_0x57a9('0x27')](function(_0x2ec437){logger[_0x57a9('0x1c')]('GetOpenchannelQueue',_0x38ef9c);logger['debug'](_0x57a9('0x1d'),_0x38ef9c,JSON[_0x57a9('0x18')](_0x2ec437));_0x348657(_0x2ec437);})[_0x57a9('0x28')](function(_0x4a8f1f){logger['error'](_0x57a9('0x1d'),_0x4a8f1f[_0x57a9('0x1b')],_0x38ef9c);_0x58d1c0(_0x31136c[_0x57a9('0x19')](0x1f4,_0x4a8f1f['message']));});});};exports['ShowOpenchannelQueue']=function(_0x3fed80){var _0x758b82=this;return new Promise(function(_0x468ff2,_0xffade7){return db[_0x57a9('0x1e')][_0x57a9('0x29')]({'raw':_0x3fed80[_0x57a9('0x20')]?_0x3fed80[_0x57a9('0x20')][_0x57a9('0x21')]===undefined?!![]:![]:!![],'where':_0x3fed80['options']?_0x3fed80[_0x57a9('0x20')]['where']||null:null,'attributes':_0x3fed80[_0x57a9('0x20')]?_0x3fed80[_0x57a9('0x20')][_0x57a9('0x22')]||null:null,'include':_0x3fed80[_0x57a9('0x20')]?_0x3fed80['options'][_0x57a9('0x24')]?_[_0x57a9('0x25')](_0x3fed80['options'][_0x57a9('0x24')],function(_0x430ee6){return{'model':db[_0x430ee6[_0x57a9('0x26')]],'as':_0x430ee6['as'],'attributes':_0x430ee6[_0x57a9('0x22')],'include':_0x430ee6[_0x57a9('0x24')]?_[_0x57a9('0x25')](_0x430ee6[_0x57a9('0x24')],function(_0x43bde9){return{'model':db[_0x43bde9[_0x57a9('0x26')]],'as':_0x43bde9['as'],'attributes':_0x43bde9[_0x57a9('0x22')],'include':_0x43bde9[_0x57a9('0x24')]?_[_0x57a9('0x25')](_0x43bde9['include'],function(_0x4a3781){return{'model':db[_0x4a3781[_0x57a9('0x26')]],'as':_0x4a3781['as'],'attributes':_0x4a3781[_0x57a9('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3fa37c){logger[_0x57a9('0x1c')](_0x57a9('0x2a'),_0x3fed80);logger[_0x57a9('0x16')](_0x57a9('0x2a'),_0x3fed80,JSON[_0x57a9('0x18')](_0x3fa37c));_0x468ff2(_0x3fa37c);})[_0x57a9('0x28')](function(_0x3184d7){logger[_0x57a9('0x19')](_0x57a9('0x2a'),_0x3184d7['message'],_0x3fed80);_0xffade7(_0x758b82[_0x57a9('0x19')](0x1f4,_0x3184d7[_0x57a9('0x1b')]));});});};
\ No newline at end of file
+var _0x1cd9=['info','OpenchannelQueue,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','GetOpenchannelQueue','findAll','options','where','attributes','limit','include','map','model','then','ShowOpenchannelQueue','OpenchannelQueue','find','raw','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','localhost','socket.io-emitter','./openchannelQueue.socket','register'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1cd9,0xb4));var _0x91cd=function(_0x34933a,_0x327378){_0x34933a=_0x34933a-0x0;var _0x36abb4=_0x1cd9[_0x34933a];return _0x36abb4;};'use strict';var _=require(_0x91cd('0x0'));var util=require(_0x91cd('0x1'));var moment=require(_0x91cd('0x2'));var BPromise=require(_0x91cd('0x3'));var rs=require(_0x91cd('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x91cd('0x5'));var logger=require(_0x91cd('0x6'))(_0x91cd('0x7'));var config=require('../../config/environment');var jayson=require(_0x91cd('0x8'));var client=jayson[_0x91cd('0x9')]['http']({'port':0x232a});config[_0x91cd('0xa')]=_['defaults'](config[_0x91cd('0xa')],{'host':_0x91cd('0xb'),'port':0x18eb});var socket=require(_0x91cd('0xc'))(new Redis(config['redis']));require(_0x91cd('0xd'))[_0x91cd('0xe')](socket);function respondWithRpcPromise(_0x385dd9,_0xe753bc,_0x23aaf0){return new BPromise(function(_0x275e1f,_0x66495c){return client['request'](_0x385dd9,_0x23aaf0)['then'](function(_0x147614){logger[_0x91cd('0xf')](_0x91cd('0x10'),_0xe753bc,'request\x20sent');logger[_0x91cd('0x11')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0xe753bc,_0x91cd('0x12'),JSON[_0x91cd('0x13')](_0x147614));if(_0x147614[_0x91cd('0x14')]){if(_0x147614[_0x91cd('0x14')][_0x91cd('0x15')]===0x1f4){logger[_0x91cd('0x14')](_0x91cd('0x10'),_0xe753bc,_0x147614[_0x91cd('0x14')]['message']);return _0x66495c(_0x147614[_0x91cd('0x14')]['message']);}logger[_0x91cd('0x14')](_0x91cd('0x10'),_0xe753bc,_0x147614['error'][_0x91cd('0x16')]);return _0x275e1f(_0x147614['error'][_0x91cd('0x16')]);}else{logger[_0x91cd('0xf')](_0x91cd('0x10'),_0xe753bc,_0x91cd('0x12'));_0x275e1f(_0x147614[_0x91cd('0x17')]['message']);}})['catch'](function(_0x12d817){logger[_0x91cd('0x14')](_0x91cd('0x10'),_0xe753bc,_0x12d817);_0x66495c(_0x12d817);});});}exports[_0x91cd('0x18')]=function(_0x5456b7){var _0x451ff4=this;return new Promise(function(_0x5906ed,_0x2fdcd0){return db['OpenchannelQueue'][_0x91cd('0x19')]({'raw':_0x5456b7[_0x91cd('0x1a')]?_0x5456b7[_0x91cd('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x5456b7[_0x91cd('0x1a')]?_0x5456b7[_0x91cd('0x1a')][_0x91cd('0x1b')]||null:null,'attributes':_0x5456b7[_0x91cd('0x1a')]?_0x5456b7[_0x91cd('0x1a')][_0x91cd('0x1c')]||null:null,'limit':_0x5456b7[_0x91cd('0x1a')]?_0x5456b7['options'][_0x91cd('0x1d')]||null:null,'include':_0x5456b7[_0x91cd('0x1a')]?_0x5456b7[_0x91cd('0x1a')][_0x91cd('0x1e')]?_[_0x91cd('0x1f')](_0x5456b7[_0x91cd('0x1a')]['include'],function(_0x3017a6){return{'model':db[_0x3017a6['model']],'as':_0x3017a6['as'],'attributes':_0x3017a6[_0x91cd('0x1c')],'include':_0x3017a6['include']?_[_0x91cd('0x1f')](_0x3017a6[_0x91cd('0x1e')],function(_0xccbbf9){return{'model':db[_0xccbbf9[_0x91cd('0x20')]],'as':_0xccbbf9['as'],'attributes':_0xccbbf9[_0x91cd('0x1c')],'include':_0xccbbf9['include']?_[_0x91cd('0x1f')](_0xccbbf9[_0x91cd('0x1e')],function(_0x2c0227){return{'model':db[_0x2c0227[_0x91cd('0x20')]],'as':_0x2c0227['as'],'attributes':_0x2c0227[_0x91cd('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x91cd('0x21')](function(_0x46ef68){logger[_0x91cd('0xf')](_0x91cd('0x18'),_0x5456b7);logger[_0x91cd('0x11')](_0x91cd('0x18'),_0x5456b7,JSON[_0x91cd('0x13')](_0x46ef68));_0x5906ed(_0x46ef68);})['catch'](function(_0xf0253a){logger[_0x91cd('0x14')](_0x91cd('0x18'),_0xf0253a['message'],_0x5456b7);_0x2fdcd0(_0x451ff4[_0x91cd('0x14')](0x1f4,_0xf0253a[_0x91cd('0x16')]));});});};exports[_0x91cd('0x22')]=function(_0x75d50a){var _0x8cd80c=this;return new Promise(function(_0x29d2da,_0x20672d){return db[_0x91cd('0x23')][_0x91cd('0x24')]({'raw':_0x75d50a[_0x91cd('0x1a')]?_0x75d50a['options'][_0x91cd('0x25')]===undefined?!![]:![]:!![],'where':_0x75d50a[_0x91cd('0x1a')]?_0x75d50a[_0x91cd('0x1a')][_0x91cd('0x1b')]||null:null,'attributes':_0x75d50a[_0x91cd('0x1a')]?_0x75d50a['options']['attributes']||null:null,'include':_0x75d50a['options']?_0x75d50a[_0x91cd('0x1a')][_0x91cd('0x1e')]?_['map'](_0x75d50a['options'][_0x91cd('0x1e')],function(_0x243d9e){return{'model':db[_0x243d9e['model']],'as':_0x243d9e['as'],'attributes':_0x243d9e['attributes'],'include':_0x243d9e['include']?_[_0x91cd('0x1f')](_0x243d9e[_0x91cd('0x1e')],function(_0x413f18){return{'model':db[_0x413f18['model']],'as':_0x413f18['as'],'attributes':_0x413f18[_0x91cd('0x1c')],'include':_0x413f18[_0x91cd('0x1e')]?_[_0x91cd('0x1f')](_0x413f18[_0x91cd('0x1e')],function(_0x41e312){return{'model':db[_0x41e312[_0x91cd('0x20')]],'as':_0x41e312['as'],'attributes':_0x41e312[_0x91cd('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x91cd('0x21')](function(_0x43a961){logger['info'](_0x91cd('0x22'),_0x75d50a);logger[_0x91cd('0x11')](_0x91cd('0x22'),_0x75d50a,JSON[_0x91cd('0x13')](_0x43a961));_0x29d2da(_0x43a961);})[_0x91cd('0x26')](function(_0x2d0fd6){logger[_0x91cd('0x14')](_0x91cd('0x22'),_0x2d0fd6[_0x91cd('0x16')],_0x75d50a);_0x20672d(_0x8cd80c[_0x91cd('0x14')](0x1f4,_0x2d0fd6[_0x91cd('0x16')]));});});};
\ No newline at end of file