Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 4d01167..c13e44d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbbd=['GetOpenchannelQueue','findAll','options','raw','attributes','limit','include','map','model','OpenchannelQueue','find','where','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch'];(function(_0x5c5e63,_0x581a8c){var _0xc5ae77=function(_0x42d401){while(--_0x42d401){_0x5c5e63['push'](_0x5c5e63['shift']());}};_0xc5ae77(++_0x581a8c);}(_0xdbbd,0x17e));var _0xddbb=function(_0x5bd426,_0x4878e5){_0x5bd426=_0x5bd426-0x0;var _0x23a7eb=_0xdbbd[_0x5bd426];return _0x23a7eb;};'use strict';var _=require(_0xddbb('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xddbb('0x1'));var fs=require('fs');var Redis=require(_0xddbb('0x2'));var db=require(_0xddbb('0x3'))['db'];var utils=require(_0xddbb('0x4'));var logger=require(_0xddbb('0x5'))(_0xddbb('0x6'));var config=require('../../config/environment');var jayson=require(_0xddbb('0x7'));var client=jayson[_0xddbb('0x8')][_0xddbb('0x9')]({'port':0x232a});config['redis']=_['defaults'](config[_0xddbb('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xddbb('0xb'))(new Redis(config[_0xddbb('0xa')]));require(_0xddbb('0xc'))[_0xddbb('0xd')](socket);function respondWithRpcPromise(_0x417fb2,_0x40ecb3,_0x153ef5){return new BPromise(function(_0x491196,_0x3a8353){return client[_0xddbb('0xe')](_0x417fb2,_0x153ef5)[_0xddbb('0xf')](function(_0x5be8a4){logger[_0xddbb('0x10')](_0xddbb('0x11'),_0x40ecb3,_0xddbb('0x12'));logger[_0xddbb('0x13')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x40ecb3,_0xddbb('0x12'),JSON[_0xddbb('0x14')](_0x5be8a4));if(_0x5be8a4[_0xddbb('0x15')]){if(_0x5be8a4[_0xddbb('0x15')][_0xddbb('0x16')]===0x1f4){logger[_0xddbb('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x40ecb3,_0x5be8a4[_0xddbb('0x15')]['message']);return _0x3a8353(_0x5be8a4[_0xddbb('0x15')][_0xddbb('0x17')]);}logger[_0xddbb('0x15')](_0xddbb('0x11'),_0x40ecb3,_0x5be8a4[_0xddbb('0x15')][_0xddbb('0x17')]);return _0x491196(_0x5be8a4[_0xddbb('0x15')][_0xddbb('0x17')]);}else{logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x40ecb3,'request\x20sent');_0x491196(_0x5be8a4['result'][_0xddbb('0x17')]);}})[_0xddbb('0x18')](function(_0x3c2fec){logger[_0xddbb('0x15')](_0xddbb('0x11'),_0x40ecb3,_0x3c2fec);_0x3a8353(_0x3c2fec);});});}exports[_0xddbb('0x19')]=function(_0x572a5f){var _0x29e4d7=this;return new Promise(function(_0x3868d1,_0x390ad6){return db['OpenchannelQueue'][_0xddbb('0x1a')]({'raw':_0x572a5f[_0xddbb('0x1b')]?_0x572a5f[_0xddbb('0x1b')][_0xddbb('0x1c')]===undefined?!![]:![]:!![],'where':_0x572a5f[_0xddbb('0x1b')]?_0x572a5f['options']['where']||null:null,'attributes':_0x572a5f[_0xddbb('0x1b')]?_0x572a5f[_0xddbb('0x1b')][_0xddbb('0x1d')]||null:null,'limit':_0x572a5f[_0xddbb('0x1b')]?_0x572a5f[_0xddbb('0x1b')][_0xddbb('0x1e')]||null:null,'include':_0x572a5f[_0xddbb('0x1b')]?_0x572a5f['options'][_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x572a5f[_0xddbb('0x1b')][_0xddbb('0x1f')],function(_0x2c952c){return{'model':db[_0x2c952c['model']],'as':_0x2c952c['as'],'attributes':_0x2c952c[_0xddbb('0x1d')],'include':_0x2c952c[_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x2c952c[_0xddbb('0x1f')],function(_0x882ee7){return{'model':db[_0x882ee7[_0xddbb('0x21')]],'as':_0x882ee7['as'],'attributes':_0x882ee7['attributes'],'include':_0x882ee7[_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x882ee7['include'],function(_0x45cc05){return{'model':db[_0x45cc05[_0xddbb('0x21')]],'as':_0x45cc05['as'],'attributes':_0x45cc05['attributes']};}):[]};}):[]};}):[]:[]})[_0xddbb('0xf')](function(_0x1bc436){logger[_0xddbb('0x10')]('GetOpenchannelQueue',_0x572a5f);logger[_0xddbb('0x13')](_0xddbb('0x19'),_0x572a5f,JSON['stringify'](_0x1bc436));_0x3868d1(_0x1bc436);})[_0xddbb('0x18')](function(_0x172c09){logger[_0xddbb('0x15')](_0xddbb('0x19'),_0x172c09[_0xddbb('0x17')],_0x572a5f);_0x390ad6(_0x29e4d7[_0xddbb('0x15')](0x1f4,_0x172c09[_0xddbb('0x17')]));});});};exports['ShowOpenchannelQueue']=function(_0x275cf7){var _0x5d1f4f=this;return new Promise(function(_0x281ace,_0x4123bf){return db[_0xddbb('0x22')][_0xddbb('0x23')]({'raw':_0x275cf7[_0xddbb('0x1b')]?_0x275cf7['options'][_0xddbb('0x1c')]===undefined?!![]:![]:!![],'where':_0x275cf7[_0xddbb('0x1b')]?_0x275cf7[_0xddbb('0x1b')][_0xddbb('0x24')]||null:null,'attributes':_0x275cf7[_0xddbb('0x1b')]?_0x275cf7[_0xddbb('0x1b')]['attributes']||null:null,'include':_0x275cf7[_0xddbb('0x1b')]?_0x275cf7[_0xddbb('0x1b')][_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x275cf7['options'][_0xddbb('0x1f')],function(_0x1dbb5b){return{'model':db[_0x1dbb5b[_0xddbb('0x21')]],'as':_0x1dbb5b['as'],'attributes':_0x1dbb5b[_0xddbb('0x1d')],'include':_0x1dbb5b[_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x1dbb5b[_0xddbb('0x1f')],function(_0x5ef10b){return{'model':db[_0x5ef10b[_0xddbb('0x21')]],'as':_0x5ef10b['as'],'attributes':_0x5ef10b[_0xddbb('0x1d')],'include':_0x5ef10b[_0xddbb('0x1f')]?_[_0xddbb('0x20')](_0x5ef10b['include'],function(_0x4a1ec7){return{'model':db[_0x4a1ec7[_0xddbb('0x21')]],'as':_0x4a1ec7['as'],'attributes':_0x4a1ec7[_0xddbb('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xddbb('0xf')](function(_0x5a5408){logger[_0xddbb('0x10')]('ShowOpenchannelQueue',_0x275cf7);logger['debug']('ShowOpenchannelQueue',_0x275cf7,JSON[_0xddbb('0x14')](_0x5a5408));_0x281ace(_0x5a5408);})['catch'](function(_0x20ce39){logger[_0xddbb('0x15')]('ShowOpenchannelQueue',_0x20ce39[_0xddbb('0x17')],_0x275cf7);_0x4123bf(_0x5d1f4f[_0xddbb('0x15')](0x1f4,_0x20ce39[_0xddbb('0x17')]));});});};
\ No newline at end of file
+var _0x5943=['info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','attributes','limit','include','model','map','debug','ShowOpenchannelQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','request','then'];(function(_0x53fe97,_0x544271){var _0x5c49a2=function(_0x3fa2b4){while(--_0x3fa2b4){_0x53fe97['push'](_0x53fe97['shift']());}};_0x5c49a2(++_0x544271);}(_0x5943,0x100));var _0x3594=function(_0x33f59e,_0x205ab7){_0x33f59e=_0x33f59e-0x0;var _0x2152a5=_0x5943[_0x33f59e];return _0x2152a5;};'use strict';var _=require(_0x3594('0x0'));var util=require(_0x3594('0x1'));var moment=require(_0x3594('0x2'));var BPromise=require(_0x3594('0x3'));var rs=require(_0x3594('0x4'));var fs=require('fs');var Redis=require(_0x3594('0x5'));var db=require(_0x3594('0x6'))['db'];var utils=require(_0x3594('0x7'));var logger=require(_0x3594('0x8'))(_0x3594('0x9'));var config=require(_0x3594('0xa'));var jayson=require(_0x3594('0xb'));var client=jayson[_0x3594('0xc')]['http']({'port':0x232a});config[_0x3594('0xd')]=_['defaults'](config[_0x3594('0xd')],{'host':_0x3594('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3594('0xd')]));require('./openchannelQueue.socket')['register'](socket);function respondWithRpcPromise(_0x38e773,_0x354fa9,_0x286b9){return new BPromise(function(_0x23aa8f,_0xf8c056){return client[_0x3594('0xf')](_0x38e773,_0x286b9)[_0x3594('0x10')](function(_0x5ef550){logger[_0x3594('0x11')](_0x3594('0x12'),_0x354fa9,_0x3594('0x13'));logger['debug']('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x354fa9,_0x3594('0x13'),JSON[_0x3594('0x14')](_0x5ef550));if(_0x5ef550['error']){if(_0x5ef550[_0x3594('0x15')][_0x3594('0x16')]===0x1f4){logger[_0x3594('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x354fa9,_0x5ef550['error'][_0x3594('0x17')]);return _0xf8c056(_0x5ef550['error'][_0x3594('0x17')]);}logger[_0x3594('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x354fa9,_0x5ef550[_0x3594('0x15')][_0x3594('0x17')]);return _0x23aa8f(_0x5ef550['error'][_0x3594('0x17')]);}else{logger[_0x3594('0x11')](_0x3594('0x12'),_0x354fa9,'request\x20sent');_0x23aa8f(_0x5ef550[_0x3594('0x18')][_0x3594('0x17')]);}})[_0x3594('0x19')](function(_0x469943){logger[_0x3594('0x15')](_0x3594('0x12'),_0x354fa9,_0x469943);_0xf8c056(_0x469943);});});}exports[_0x3594('0x1a')]=function(_0x47924a){var _0x469a13=this;return new Promise(function(_0x59df9d,_0x39dc7c){return db[_0x3594('0x1b')][_0x3594('0x1c')]({'raw':_0x47924a[_0x3594('0x1d')]?_0x47924a[_0x3594('0x1d')][_0x3594('0x1e')]===undefined?!![]:![]:!![],'where':_0x47924a[_0x3594('0x1d')]?_0x47924a[_0x3594('0x1d')]['where']||null:null,'attributes':_0x47924a[_0x3594('0x1d')]?_0x47924a['options'][_0x3594('0x1f')]||null:null,'limit':_0x47924a[_0x3594('0x1d')]?_0x47924a[_0x3594('0x1d')][_0x3594('0x20')]||null:null,'include':_0x47924a[_0x3594('0x1d')]?_0x47924a[_0x3594('0x1d')][_0x3594('0x21')]?_['map'](_0x47924a[_0x3594('0x1d')][_0x3594('0x21')],function(_0x434442){return{'model':db[_0x434442[_0x3594('0x22')]],'as':_0x434442['as'],'attributes':_0x434442[_0x3594('0x1f')],'include':_0x434442[_0x3594('0x21')]?_[_0x3594('0x23')](_0x434442[_0x3594('0x21')],function(_0x7733fe){return{'model':db[_0x7733fe[_0x3594('0x22')]],'as':_0x7733fe['as'],'attributes':_0x7733fe[_0x3594('0x1f')],'include':_0x7733fe[_0x3594('0x21')]?_[_0x3594('0x23')](_0x7733fe['include'],function(_0x4ad834){return{'model':db[_0x4ad834[_0x3594('0x22')]],'as':_0x4ad834['as'],'attributes':_0x4ad834[_0x3594('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x316bb9){logger['info'](_0x3594('0x1a'),_0x47924a);logger[_0x3594('0x24')]('GetOpenchannelQueue',_0x47924a,JSON[_0x3594('0x14')](_0x316bb9));_0x59df9d(_0x316bb9);})[_0x3594('0x19')](function(_0x35da8d){logger[_0x3594('0x15')](_0x3594('0x1a'),_0x35da8d[_0x3594('0x17')],_0x47924a);_0x39dc7c(_0x469a13[_0x3594('0x15')](0x1f4,_0x35da8d[_0x3594('0x17')]));});});};exports[_0x3594('0x25')]=function(_0x4fd009){var _0x211bdf=this;return new Promise(function(_0x44d496,_0x273c1b){return db[_0x3594('0x1b')][_0x3594('0x26')]({'raw':_0x4fd009['options']?_0x4fd009[_0x3594('0x1d')][_0x3594('0x1e')]===undefined?!![]:![]:!![],'where':_0x4fd009[_0x3594('0x1d')]?_0x4fd009[_0x3594('0x1d')]['where']||null:null,'attributes':_0x4fd009[_0x3594('0x1d')]?_0x4fd009[_0x3594('0x1d')][_0x3594('0x1f')]||null:null,'include':_0x4fd009[_0x3594('0x1d')]?_0x4fd009[_0x3594('0x1d')][_0x3594('0x21')]?_['map'](_0x4fd009[_0x3594('0x1d')][_0x3594('0x21')],function(_0x3570bf){return{'model':db[_0x3570bf[_0x3594('0x22')]],'as':_0x3570bf['as'],'attributes':_0x3570bf[_0x3594('0x1f')],'include':_0x3570bf[_0x3594('0x21')]?_[_0x3594('0x23')](_0x3570bf['include'],function(_0xb7f591){return{'model':db[_0xb7f591['model']],'as':_0xb7f591['as'],'attributes':_0xb7f591[_0x3594('0x1f')],'include':_0xb7f591[_0x3594('0x21')]?_['map'](_0xb7f591[_0x3594('0x21')],function(_0x28087e){return{'model':db[_0x28087e[_0x3594('0x22')]],'as':_0x28087e['as'],'attributes':_0x28087e['attributes']};}):[]};}):[]};}):[]:[]})[_0x3594('0x10')](function(_0x4dfbea){logger['info'](_0x3594('0x25'),_0x4fd009);logger['debug'](_0x3594('0x25'),_0x4fd009,JSON[_0x3594('0x14')](_0x4dfbea));_0x44d496(_0x4dfbea);})[_0x3594('0x19')](function(_0x114792){logger[_0x3594('0x15')]('ShowOpenchannelQueue',_0x114792['message'],_0x4fd009);_0x273c1b(_0x211bdf[_0x3594('0x15')](0x1f4,_0x114792[_0x3594('0x17')]));});});};
\ No newline at end of file