Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index fd4ec92..8af384b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x693c=['raw','where','limit','include','map','model','attributes','then','GetOpenchannelQueue','ShowOpenchannelQueue','find','catch','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','OpenchannelQueue','findAll','options'];(function(_0x10b678,_0x3184c4){var _0x40b717=function(_0x483287){while(--_0x483287){_0x10b678['push'](_0x10b678['shift']());}};_0x40b717(++_0x3184c4);}(_0x693c,0x102));var _0xc693=function(_0x23dfa0,_0x3a79c4){_0x23dfa0=_0x23dfa0-0x0;var _0x43fe74=_0x693c[_0x23dfa0];return _0x43fe74;};'use strict';var _=require(_0xc693('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xc693('0x1'));var fs=require('fs');var Redis=require(_0xc693('0x2'));var db=require(_0xc693('0x3'))['db'];var utils=require(_0xc693('0x4'));var logger=require(_0xc693('0x5'))(_0xc693('0x6'));var config=require(_0xc693('0x7'));var jayson=require(_0xc693('0x8'));var client=jayson[_0xc693('0x9')]['http']({'port':0x232a});config['redis']=_[_0xc693('0xa')](config[_0xc693('0xb')],{'host':_0xc693('0xc'),'port':0x18eb});var socket=require(_0xc693('0xd'))(new Redis(config[_0xc693('0xb')]));require(_0xc693('0xe'))[_0xc693('0xf')](socket);function respondWithRpcPromise(_0x3a77fe,_0x400b00,_0x34a16e){return new BPromise(function(_0x25c661,_0x941101){return client[_0xc693('0x10')](_0x3a77fe,_0x34a16e)['then'](function(_0x21c45a){logger[_0xc693('0x11')](_0xc693('0x12'),_0x400b00,_0xc693('0x13'));logger[_0xc693('0x14')](_0xc693('0x15'),_0x400b00,_0xc693('0x13'),JSON[_0xc693('0x16')](_0x21c45a));if(_0x21c45a['error']){if(_0x21c45a['error']['code']===0x1f4){logger[_0xc693('0x17')](_0xc693('0x12'),_0x400b00,_0x21c45a[_0xc693('0x17')][_0xc693('0x18')]);return _0x941101(_0x21c45a[_0xc693('0x17')][_0xc693('0x18')]);}logger[_0xc693('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x400b00,_0x21c45a[_0xc693('0x17')][_0xc693('0x18')]);return _0x25c661(_0x21c45a[_0xc693('0x17')]['message']);}else{logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x400b00,_0xc693('0x13'));_0x25c661(_0x21c45a[_0xc693('0x19')][_0xc693('0x18')]);}})['catch'](function(_0x2d376d){logger[_0xc693('0x17')](_0xc693('0x12'),_0x400b00,_0x2d376d);_0x941101(_0x2d376d);});});}exports['GetOpenchannelQueue']=function(_0x2b1298){var _0x36c370=this;return new Promise(function(_0x939bf5,_0x29cc34){return db[_0xc693('0x1a')][_0xc693('0x1b')]({'raw':_0x2b1298[_0xc693('0x1c')]?_0x2b1298[_0xc693('0x1c')][_0xc693('0x1d')]===undefined?!![]:![]:!![],'where':_0x2b1298[_0xc693('0x1c')]?_0x2b1298['options'][_0xc693('0x1e')]||null:null,'attributes':_0x2b1298[_0xc693('0x1c')]?_0x2b1298[_0xc693('0x1c')]['attributes']||null:null,'limit':_0x2b1298['options']?_0x2b1298[_0xc693('0x1c')][_0xc693('0x1f')]||null:null,'include':_0x2b1298[_0xc693('0x1c')]?_0x2b1298[_0xc693('0x1c')][_0xc693('0x20')]?_[_0xc693('0x21')](_0x2b1298['options'][_0xc693('0x20')],function(_0x2f3bfd){return{'model':db[_0x2f3bfd[_0xc693('0x22')]],'as':_0x2f3bfd['as'],'attributes':_0x2f3bfd[_0xc693('0x23')],'include':_0x2f3bfd[_0xc693('0x20')]?_['map'](_0x2f3bfd['include'],function(_0x25348d){return{'model':db[_0x25348d[_0xc693('0x22')]],'as':_0x25348d['as'],'attributes':_0x25348d[_0xc693('0x23')],'include':_0x25348d[_0xc693('0x20')]?_['map'](_0x25348d[_0xc693('0x20')],function(_0x59987c){return{'model':db[_0x59987c[_0xc693('0x22')]],'as':_0x59987c['as'],'attributes':_0x59987c[_0xc693('0x23')]};}):[]};}):[]};}):[]:[]})[_0xc693('0x24')](function(_0x443eba){logger[_0xc693('0x11')](_0xc693('0x25'),_0x2b1298);logger[_0xc693('0x14')](_0xc693('0x25'),_0x2b1298,JSON[_0xc693('0x16')](_0x443eba));_0x939bf5(_0x443eba);})['catch'](function(_0x41e313){logger[_0xc693('0x17')](_0xc693('0x25'),_0x41e313[_0xc693('0x18')],_0x2b1298);_0x29cc34(_0x36c370['error'](0x1f4,_0x41e313[_0xc693('0x18')]));});});};exports[_0xc693('0x26')]=function(_0x3818a1){var _0x2f5252=this;return new Promise(function(_0x138421,_0x25d8ba){return db['OpenchannelQueue'][_0xc693('0x27')]({'raw':_0x3818a1[_0xc693('0x1c')]?_0x3818a1[_0xc693('0x1c')][_0xc693('0x1d')]===undefined?!![]:![]:!![],'where':_0x3818a1[_0xc693('0x1c')]?_0x3818a1[_0xc693('0x1c')][_0xc693('0x1e')]||null:null,'attributes':_0x3818a1[_0xc693('0x1c')]?_0x3818a1['options'][_0xc693('0x23')]||null:null,'include':_0x3818a1[_0xc693('0x1c')]?_0x3818a1[_0xc693('0x1c')][_0xc693('0x20')]?_[_0xc693('0x21')](_0x3818a1[_0xc693('0x1c')][_0xc693('0x20')],function(_0x32685f){return{'model':db[_0x32685f[_0xc693('0x22')]],'as':_0x32685f['as'],'attributes':_0x32685f[_0xc693('0x23')],'include':_0x32685f[_0xc693('0x20')]?_[_0xc693('0x21')](_0x32685f[_0xc693('0x20')],function(_0x2026be){return{'model':db[_0x2026be['model']],'as':_0x2026be['as'],'attributes':_0x2026be['attributes'],'include':_0x2026be[_0xc693('0x20')]?_[_0xc693('0x21')](_0x2026be[_0xc693('0x20')],function(_0x4690f7){return{'model':db[_0x4690f7['model']],'as':_0x4690f7['as'],'attributes':_0x4690f7[_0xc693('0x23')]};}):[]};}):[]};}):[]:[]})[_0xc693('0x24')](function(_0x3cfc05){logger[_0xc693('0x11')](_0xc693('0x26'),_0x3818a1);logger[_0xc693('0x14')]('ShowOpenchannelQueue',_0x3818a1,JSON[_0xc693('0x16')](_0x3cfc05));_0x138421(_0x3cfc05);})[_0xc693('0x28')](function(_0x1c4a7d){logger[_0xc693('0x17')]('ShowOpenchannelQueue',_0x1c4a7d[_0xc693('0x18')],_0x3818a1);_0x25d8ba(_0x2f5252[_0xc693('0x17')](0x1f4,_0x1c4a7d[_0xc693('0x18')]));});});};
\ No newline at end of file
+var _0xfcd4=['OpenchannelQueue,\x20%s,\x20%s','message','info','result','OpenchannelQueue','findAll','options','raw','attributes','limit','include','map','model','then','GetOpenchannelQueue','debug','catch','ShowOpenchannelQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request\x20sent','stringify','error','code'];(function(_0x579aaa,_0xa6838c){var _0x40d71e=function(_0x313b38){while(--_0x313b38){_0x579aaa['push'](_0x579aaa['shift']());}};_0x40d71e(++_0xa6838c);}(_0xfcd4,0x109));var _0x4fcd=function(_0x55c3d9,_0x3bf75c){_0x55c3d9=_0x55c3d9-0x0;var _0x19fd97=_0xfcd4[_0x55c3d9];return _0x19fd97;};'use strict';var _=require(_0x4fcd('0x0'));var util=require(_0x4fcd('0x1'));var moment=require(_0x4fcd('0x2'));var BPromise=require(_0x4fcd('0x3'));var rs=require(_0x4fcd('0x4'));var fs=require('fs');var Redis=require(_0x4fcd('0x5'));var db=require(_0x4fcd('0x6'))['db'];var utils=require(_0x4fcd('0x7'));var logger=require(_0x4fcd('0x8'))('rpc');var config=require(_0x4fcd('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x4fcd('0xa')][_0x4fcd('0xb')]({'port':0x232a});config[_0x4fcd('0xc')]=_[_0x4fcd('0xd')](config['redis'],{'host':_0x4fcd('0xe'),'port':0x18eb});var socket=require(_0x4fcd('0xf'))(new Redis(config['redis']));require(_0x4fcd('0x10'))[_0x4fcd('0x11')](socket);function respondWithRpcPromise(_0x587329,_0x4d1e46,_0x285ec4){return new BPromise(function(_0x476e63,_0x5097ad){return client['request'](_0x587329,_0x285ec4)['then'](function(_0x3aecf1){logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x4d1e46,_0x4fcd('0x12'));logger['debug']('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x4d1e46,_0x4fcd('0x12'),JSON[_0x4fcd('0x13')](_0x3aecf1));if(_0x3aecf1[_0x4fcd('0x14')]){if(_0x3aecf1[_0x4fcd('0x14')][_0x4fcd('0x15')]===0x1f4){logger[_0x4fcd('0x14')](_0x4fcd('0x16'),_0x4d1e46,_0x3aecf1[_0x4fcd('0x14')][_0x4fcd('0x17')]);return _0x5097ad(_0x3aecf1['error'][_0x4fcd('0x17')]);}logger[_0x4fcd('0x14')](_0x4fcd('0x16'),_0x4d1e46,_0x3aecf1['error'][_0x4fcd('0x17')]);return _0x476e63(_0x3aecf1['error'][_0x4fcd('0x17')]);}else{logger[_0x4fcd('0x18')]('OpenchannelQueue,\x20%s,\x20%s',_0x4d1e46,_0x4fcd('0x12'));_0x476e63(_0x3aecf1[_0x4fcd('0x19')][_0x4fcd('0x17')]);}})['catch'](function(_0x27cce1){logger[_0x4fcd('0x14')](_0x4fcd('0x16'),_0x4d1e46,_0x27cce1);_0x5097ad(_0x27cce1);});});}exports['GetOpenchannelQueue']=function(_0xc429f){var _0x3bc681=this;return new Promise(function(_0x3ff585,_0x51f404){return db[_0x4fcd('0x1a')][_0x4fcd('0x1b')]({'raw':_0xc429f[_0x4fcd('0x1c')]?_0xc429f[_0x4fcd('0x1c')][_0x4fcd('0x1d')]===undefined?!![]:![]:!![],'where':_0xc429f[_0x4fcd('0x1c')]?_0xc429f['options']['where']||null:null,'attributes':_0xc429f['options']?_0xc429f[_0x4fcd('0x1c')][_0x4fcd('0x1e')]||null:null,'limit':_0xc429f[_0x4fcd('0x1c')]?_0xc429f[_0x4fcd('0x1c')][_0x4fcd('0x1f')]||null:null,'include':_0xc429f['options']?_0xc429f['options'][_0x4fcd('0x20')]?_[_0x4fcd('0x21')](_0xc429f[_0x4fcd('0x1c')][_0x4fcd('0x20')],function(_0x572ac8){return{'model':db[_0x572ac8[_0x4fcd('0x22')]],'as':_0x572ac8['as'],'attributes':_0x572ac8[_0x4fcd('0x1e')],'include':_0x572ac8[_0x4fcd('0x20')]?_['map'](_0x572ac8[_0x4fcd('0x20')],function(_0x1bba06){return{'model':db[_0x1bba06['model']],'as':_0x1bba06['as'],'attributes':_0x1bba06[_0x4fcd('0x1e')],'include':_0x1bba06[_0x4fcd('0x20')]?_['map'](_0x1bba06[_0x4fcd('0x20')],function(_0x3bd498){return{'model':db[_0x3bd498[_0x4fcd('0x22')]],'as':_0x3bd498['as'],'attributes':_0x3bd498[_0x4fcd('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x4fcd('0x23')](function(_0x1c0c92){logger[_0x4fcd('0x18')](_0x4fcd('0x24'),_0xc429f);logger[_0x4fcd('0x25')]('GetOpenchannelQueue',_0xc429f,JSON[_0x4fcd('0x13')](_0x1c0c92));_0x3ff585(_0x1c0c92);})[_0x4fcd('0x26')](function(_0x32804f){logger[_0x4fcd('0x14')](_0x4fcd('0x24'),_0x32804f[_0x4fcd('0x17')],_0xc429f);_0x51f404(_0x3bc681[_0x4fcd('0x14')](0x1f4,_0x32804f[_0x4fcd('0x17')]));});});};exports[_0x4fcd('0x27')]=function(_0x54f426){var _0x8ddf1b=this;return new Promise(function(_0x5104a4,_0x280c3d){return db['OpenchannelQueue'][_0x4fcd('0x28')]({'raw':_0x54f426[_0x4fcd('0x1c')]?_0x54f426[_0x4fcd('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x54f426[_0x4fcd('0x1c')]?_0x54f426[_0x4fcd('0x1c')]['where']||null:null,'attributes':_0x54f426[_0x4fcd('0x1c')]?_0x54f426[_0x4fcd('0x1c')][_0x4fcd('0x1e')]||null:null,'include':_0x54f426['options']?_0x54f426[_0x4fcd('0x1c')][_0x4fcd('0x20')]?_[_0x4fcd('0x21')](_0x54f426[_0x4fcd('0x1c')][_0x4fcd('0x20')],function(_0x97a5c6){return{'model':db[_0x97a5c6[_0x4fcd('0x22')]],'as':_0x97a5c6['as'],'attributes':_0x97a5c6[_0x4fcd('0x1e')],'include':_0x97a5c6[_0x4fcd('0x20')]?_[_0x4fcd('0x21')](_0x97a5c6[_0x4fcd('0x20')],function(_0x3536c0){return{'model':db[_0x3536c0['model']],'as':_0x3536c0['as'],'attributes':_0x3536c0[_0x4fcd('0x1e')],'include':_0x3536c0[_0x4fcd('0x20')]?_[_0x4fcd('0x21')](_0x3536c0[_0x4fcd('0x20')],function(_0x53efa1){return{'model':db[_0x53efa1['model']],'as':_0x53efa1['as'],'attributes':_0x53efa1[_0x4fcd('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x445f30){logger['info']('ShowOpenchannelQueue',_0x54f426);logger[_0x4fcd('0x25')](_0x4fcd('0x27'),_0x54f426,JSON['stringify'](_0x445f30));_0x5104a4(_0x445f30);})['catch'](function(_0x27ff9f){logger[_0x4fcd('0x14')](_0x4fcd('0x27'),_0x27ff9f[_0x4fcd('0x17')],_0x54f426);_0x280c3d(_0x8ddf1b[_0x4fcd('0x14')](0x1f4,_0x27ff9f['message']));});});};
\ No newline at end of file