Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index b40619d..9964f45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf5b=['http','redis','defaults','socket.io-emitter','./openchannelQueue.socket','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','options','where','attributes','limit','include','model','map','ShowOpenchannelQueue','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x41ff7b,_0x4df64c){var _0x188617=function(_0x57b280){while(--_0x57b280){_0x41ff7b['push'](_0x41ff7b['shift']());}};_0x188617(++_0x4df64c);}(_0xaf5b,0x1f0));var _0xbaf5=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xaf5b[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0xbaf5('0x0'));var util=require('util');var moment=require(_0xbaf5('0x1'));var BPromise=require(_0xbaf5('0x2'));var rs=require(_0xbaf5('0x3'));var fs=require('fs');var Redis=require(_0xbaf5('0x4'));var db=require(_0xbaf5('0x5'))['db'];var utils=require(_0xbaf5('0x6'));var logger=require(_0xbaf5('0x7'))(_0xbaf5('0x8'));var config=require('../../config/environment');var jayson=require(_0xbaf5('0x9'));var client=jayson[_0xbaf5('0xa')][_0xbaf5('0xb')]({'port':0x232a});config[_0xbaf5('0xc')]=_[_0xbaf5('0xd')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xbaf5('0xe'))(new Redis(config['redis']));require(_0xbaf5('0xf'))['register'](socket);function respondWithRpcPromise(_0x4aebb6,_0x5473ee,_0x1a01aa){return new BPromise(function(_0x3ab5a9,_0x3bf8a3){return client[_0xbaf5('0x10')](_0x4aebb6,_0x1a01aa)[_0xbaf5('0x11')](function(_0x35c30f){logger[_0xbaf5('0x12')](_0xbaf5('0x13'),_0x5473ee,_0xbaf5('0x14'));logger[_0xbaf5('0x15')](_0xbaf5('0x16'),_0x5473ee,_0xbaf5('0x14'),JSON[_0xbaf5('0x17')](_0x35c30f));if(_0x35c30f[_0xbaf5('0x18')]){if(_0x35c30f[_0xbaf5('0x18')][_0xbaf5('0x19')]===0x1f4){logger[_0xbaf5('0x18')](_0xbaf5('0x13'),_0x5473ee,_0x35c30f['error']['message']);return _0x3bf8a3(_0x35c30f[_0xbaf5('0x18')]['message']);}logger['error'](_0xbaf5('0x13'),_0x5473ee,_0x35c30f[_0xbaf5('0x18')][_0xbaf5('0x1a')]);return _0x3ab5a9(_0x35c30f[_0xbaf5('0x18')][_0xbaf5('0x1a')]);}else{logger[_0xbaf5('0x12')]('OpenchannelQueue,\x20%s,\x20%s',_0x5473ee,_0xbaf5('0x14'));_0x3ab5a9(_0x35c30f[_0xbaf5('0x1b')]['message']);}})[_0xbaf5('0x1c')](function(_0xb2a30e){logger[_0xbaf5('0x18')](_0xbaf5('0x13'),_0x5473ee,_0xb2a30e);_0x3bf8a3(_0xb2a30e);});});}exports[_0xbaf5('0x1d')]=function(_0xb3f3b3){var _0x3037d0=this;return new Promise(function(_0xfd7d07,_0x178c74){return db[_0xbaf5('0x1e')]['findAll']({'raw':_0xb3f3b3[_0xbaf5('0x1f')]?_0xb3f3b3[_0xbaf5('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0xb3f3b3[_0xbaf5('0x1f')]?_0xb3f3b3[_0xbaf5('0x1f')][_0xbaf5('0x20')]||null:null,'attributes':_0xb3f3b3[_0xbaf5('0x1f')]?_0xb3f3b3[_0xbaf5('0x1f')][_0xbaf5('0x21')]||null:null,'limit':_0xb3f3b3['options']?_0xb3f3b3[_0xbaf5('0x1f')][_0xbaf5('0x22')]||null:null,'include':_0xb3f3b3[_0xbaf5('0x1f')]?_0xb3f3b3[_0xbaf5('0x1f')][_0xbaf5('0x23')]?_['map'](_0xb3f3b3[_0xbaf5('0x1f')][_0xbaf5('0x23')],function(_0x310742){return{'model':db[_0x310742[_0xbaf5('0x24')]],'as':_0x310742['as'],'attributes':_0x310742['attributes'],'include':_0x310742['include']?_[_0xbaf5('0x25')](_0x310742[_0xbaf5('0x23')],function(_0xb7a003){return{'model':db[_0xb7a003[_0xbaf5('0x24')]],'as':_0xb7a003['as'],'attributes':_0xb7a003['attributes'],'include':_0xb7a003[_0xbaf5('0x23')]?_[_0xbaf5('0x25')](_0xb7a003[_0xbaf5('0x23')],function(_0x71cb5a){return{'model':db[_0x71cb5a[_0xbaf5('0x24')]],'as':_0x71cb5a['as'],'attributes':_0x71cb5a[_0xbaf5('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x12141b){logger['info'](_0xbaf5('0x1d'),_0xb3f3b3);logger['debug'](_0xbaf5('0x1d'),_0xb3f3b3,JSON[_0xbaf5('0x17')](_0x12141b));_0xfd7d07(_0x12141b);})['catch'](function(_0x516805){logger['error'](_0xbaf5('0x1d'),_0x516805[_0xbaf5('0x1a')],_0xb3f3b3);_0x178c74(_0x3037d0[_0xbaf5('0x18')](0x1f4,_0x516805[_0xbaf5('0x1a')]));});});};exports[_0xbaf5('0x26')]=function(_0x28d611){var _0x17c276=this;return new Promise(function(_0xdce48d,_0x4f288b){return db[_0xbaf5('0x1e')]['find']({'raw':_0x28d611['options']?_0x28d611[_0xbaf5('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x28d611[_0xbaf5('0x1f')]?_0x28d611[_0xbaf5('0x1f')][_0xbaf5('0x20')]||null:null,'attributes':_0x28d611[_0xbaf5('0x1f')]?_0x28d611[_0xbaf5('0x1f')][_0xbaf5('0x21')]||null:null,'include':_0x28d611[_0xbaf5('0x1f')]?_0x28d611[_0xbaf5('0x1f')][_0xbaf5('0x23')]?_[_0xbaf5('0x25')](_0x28d611[_0xbaf5('0x1f')][_0xbaf5('0x23')],function(_0x4ae07e){return{'model':db[_0x4ae07e['model']],'as':_0x4ae07e['as'],'attributes':_0x4ae07e['attributes'],'include':_0x4ae07e['include']?_[_0xbaf5('0x25')](_0x4ae07e[_0xbaf5('0x23')],function(_0x20e6bc){return{'model':db[_0x20e6bc['model']],'as':_0x20e6bc['as'],'attributes':_0x20e6bc[_0xbaf5('0x21')],'include':_0x20e6bc[_0xbaf5('0x23')]?_[_0xbaf5('0x25')](_0x20e6bc['include'],function(_0x19ed44){return{'model':db[_0x19ed44[_0xbaf5('0x24')]],'as':_0x19ed44['as'],'attributes':_0x19ed44[_0xbaf5('0x21')]};}):[]};}):[]};}):[]:[]})[_0xbaf5('0x11')](function(_0xe53c19){logger[_0xbaf5('0x12')](_0xbaf5('0x26'),_0x28d611);logger[_0xbaf5('0x15')](_0xbaf5('0x26'),_0x28d611,JSON[_0xbaf5('0x17')](_0xe53c19));_0xdce48d(_0xe53c19);})['catch'](function(_0x5e1830){logger[_0xbaf5('0x18')](_0xbaf5('0x26'),_0x5e1830['message'],_0x28d611);_0x4f288b(_0x17c276[_0xbaf5('0x18')](0x1f4,_0x5e1830[_0xbaf5('0x1a')]));});});};
\ No newline at end of file
+var _0x1664=['request\x20sent','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowOpenchannelQueue','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','debug'];(function(_0x5d5d45,_0x30beb7){var _0x25978d=function(_0x550311){while(--_0x550311){_0x5d5d45['push'](_0x5d5d45['shift']());}};_0x25978d(++_0x30beb7);}(_0x1664,0xb3));var _0x4166=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0x1664[_0x32f7d7];return _0x133d09;};'use strict';var _=require(_0x4166('0x0'));var util=require(_0x4166('0x1'));var moment=require(_0x4166('0x2'));var BPromise=require(_0x4166('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4166('0x4'))['db'];var utils=require(_0x4166('0x5'));var logger=require(_0x4166('0x6'))('rpc');var config=require(_0x4166('0x7'));var jayson=require(_0x4166('0x8'));var client=jayson[_0x4166('0x9')][_0x4166('0xa')]({'port':0x232a});config[_0x4166('0xb')]=_[_0x4166('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x4166('0xd'))(new Redis(config[_0x4166('0xb')]));require(_0x4166('0xe'))[_0x4166('0xf')](socket);function respondWithRpcPromise(_0x276772,_0x536c2b,_0x2ceeb7){return new BPromise(function(_0x5947bf,_0x1e6e0b){return client[_0x4166('0x10')](_0x276772,_0x2ceeb7)[_0x4166('0x11')](function(_0x487f6d){logger[_0x4166('0x12')](_0x4166('0x13'),_0x536c2b,'request\x20sent');logger[_0x4166('0x14')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x536c2b,_0x4166('0x15'),JSON[_0x4166('0x16')](_0x487f6d));if(_0x487f6d[_0x4166('0x17')]){if(_0x487f6d[_0x4166('0x17')][_0x4166('0x18')]===0x1f4){logger[_0x4166('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x536c2b,_0x487f6d[_0x4166('0x17')]['message']);return _0x1e6e0b(_0x487f6d['error']['message']);}logger[_0x4166('0x17')](_0x4166('0x13'),_0x536c2b,_0x487f6d[_0x4166('0x17')]['message']);return _0x5947bf(_0x487f6d['error'][_0x4166('0x19')]);}else{logger[_0x4166('0x12')](_0x4166('0x13'),_0x536c2b,'request\x20sent');_0x5947bf(_0x487f6d[_0x4166('0x1a')][_0x4166('0x19')]);}})[_0x4166('0x1b')](function(_0x189dc4){logger[_0x4166('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x536c2b,_0x189dc4);_0x1e6e0b(_0x189dc4);});});}exports[_0x4166('0x1c')]=function(_0x4f45e4){var _0x251817=this;return new Promise(function(_0xb90d0c,_0x307d69){return db[_0x4166('0x1d')][_0x4166('0x1e')]({'raw':_0x4f45e4[_0x4166('0x1f')]?_0x4f45e4[_0x4166('0x1f')][_0x4166('0x20')]===undefined?!![]:![]:!![],'where':_0x4f45e4[_0x4166('0x1f')]?_0x4f45e4[_0x4166('0x1f')][_0x4166('0x21')]||null:null,'attributes':_0x4f45e4[_0x4166('0x1f')]?_0x4f45e4[_0x4166('0x1f')][_0x4166('0x22')]||null:null,'limit':_0x4f45e4[_0x4166('0x1f')]?_0x4f45e4[_0x4166('0x1f')][_0x4166('0x23')]||null:null,'include':_0x4f45e4[_0x4166('0x1f')]?_0x4f45e4[_0x4166('0x1f')][_0x4166('0x24')]?_[_0x4166('0x25')](_0x4f45e4[_0x4166('0x1f')]['include'],function(_0x4fe2ae){return{'model':db[_0x4fe2ae[_0x4166('0x26')]],'as':_0x4fe2ae['as'],'attributes':_0x4fe2ae['attributes'],'include':_0x4fe2ae['include']?_['map'](_0x4fe2ae[_0x4166('0x24')],function(_0x442f73){return{'model':db[_0x442f73[_0x4166('0x26')]],'as':_0x442f73['as'],'attributes':_0x442f73['attributes'],'include':_0x442f73[_0x4166('0x24')]?_[_0x4166('0x25')](_0x442f73[_0x4166('0x24')],function(_0x1e9859){return{'model':db[_0x1e9859[_0x4166('0x26')]],'as':_0x1e9859['as'],'attributes':_0x1e9859[_0x4166('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1de9cf){logger[_0x4166('0x12')](_0x4166('0x1c'),_0x4f45e4);logger[_0x4166('0x14')]('GetOpenchannelQueue',_0x4f45e4,JSON[_0x4166('0x16')](_0x1de9cf));_0xb90d0c(_0x1de9cf);})[_0x4166('0x1b')](function(_0x44c8d0){logger['error'](_0x4166('0x1c'),_0x44c8d0[_0x4166('0x19')],_0x4f45e4);_0x307d69(_0x251817['error'](0x1f4,_0x44c8d0[_0x4166('0x19')]));});});};exports[_0x4166('0x27')]=function(_0x2d5923){var _0xdb71e5=this;return new Promise(function(_0x541f21,_0x5dd5b9){return db['OpenchannelQueue']['find']({'raw':_0x2d5923['options']?_0x2d5923[_0x4166('0x1f')][_0x4166('0x20')]===undefined?!![]:![]:!![],'where':_0x2d5923[_0x4166('0x1f')]?_0x2d5923[_0x4166('0x1f')][_0x4166('0x21')]||null:null,'attributes':_0x2d5923[_0x4166('0x1f')]?_0x2d5923[_0x4166('0x1f')]['attributes']||null:null,'include':_0x2d5923[_0x4166('0x1f')]?_0x2d5923[_0x4166('0x1f')][_0x4166('0x24')]?_[_0x4166('0x25')](_0x2d5923['options'][_0x4166('0x24')],function(_0x1cdc4a){return{'model':db[_0x1cdc4a[_0x4166('0x26')]],'as':_0x1cdc4a['as'],'attributes':_0x1cdc4a['attributes'],'include':_0x1cdc4a['include']?_[_0x4166('0x25')](_0x1cdc4a[_0x4166('0x24')],function(_0x1fdd93){return{'model':db[_0x1fdd93[_0x4166('0x26')]],'as':_0x1fdd93['as'],'attributes':_0x1fdd93[_0x4166('0x22')],'include':_0x1fdd93[_0x4166('0x24')]?_[_0x4166('0x25')](_0x1fdd93[_0x4166('0x24')],function(_0x1dc4c7){return{'model':db[_0x1dc4c7['model']],'as':_0x1dc4c7['as'],'attributes':_0x1dc4c7[_0x4166('0x22')]};}):[]};}):[]};}):[]:[]})[_0x4166('0x11')](function(_0x34df73){logger[_0x4166('0x12')](_0x4166('0x27'),_0x2d5923);logger[_0x4166('0x14')](_0x4166('0x27'),_0x2d5923,JSON[_0x4166('0x16')](_0x34df73));_0x541f21(_0x34df73);})[_0x4166('0x1b')](function(_0x1f96ec){logger[_0x4166('0x17')]('ShowOpenchannelQueue',_0x1f96ec[_0x4166('0x19')],_0x2d5923);_0x5dd5b9(_0xdb71e5[_0x4166('0x17')](0x1f4,_0x1f96ec[_0x4166('0x19')]));});});};
\ No newline at end of file