Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index cea945d..e39c6f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2e01=['socket.io-emitter','./openchannelQueue.socket','request','then','OpenchannelQueue,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','limit','include','map','model','attributes','find','ShowOpenchannelQueue','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','redis','defaults','localhost'];(function(_0x387396,_0x33ee64){var _0x4f7d7d=function(_0x944290){while(--_0x944290){_0x387396['push'](_0x387396['shift']());}};_0x4f7d7d(++_0x33ee64);}(_0x2e01,0x183));var _0x12e0=function(_0x154942,_0x11a9fc){_0x154942=_0x154942-0x0;var _0x4a16fd=_0x2e01[_0x154942];return _0x4a16fd;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x12e0('0x0'));var BPromise=require(_0x12e0('0x1'));var rs=require(_0x12e0('0x2'));var fs=require('fs');var Redis=require(_0x12e0('0x3'));var db=require(_0x12e0('0x4'))['db'];var utils=require(_0x12e0('0x5'));var logger=require(_0x12e0('0x6'))(_0x12e0('0x7'));var config=require(_0x12e0('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x12e0('0x9')]({'port':0x232a});config[_0x12e0('0xa')]=_[_0x12e0('0xb')](config['redis'],{'host':_0x12e0('0xc'),'port':0x18eb});var socket=require(_0x12e0('0xd'))(new Redis(config[_0x12e0('0xa')]));require(_0x12e0('0xe'))['register'](socket);function respondWithRpcPromise(_0x2dcf7d,_0x1f2c51,_0x175be1){return new BPromise(function(_0x186429,_0x249bcf){return client[_0x12e0('0xf')](_0x2dcf7d,_0x175be1)[_0x12e0('0x10')](function(_0x1f7ed3){logger['info'](_0x12e0('0x11'),_0x1f2c51,'request\x20sent');logger[_0x12e0('0x12')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x1f2c51,_0x12e0('0x13'),JSON[_0x12e0('0x14')](_0x1f7ed3));if(_0x1f7ed3[_0x12e0('0x15')]){if(_0x1f7ed3[_0x12e0('0x15')][_0x12e0('0x16')]===0x1f4){logger['error'](_0x12e0('0x11'),_0x1f2c51,_0x1f7ed3['error'][_0x12e0('0x17')]);return _0x249bcf(_0x1f7ed3[_0x12e0('0x15')][_0x12e0('0x17')]);}logger['error'](_0x12e0('0x11'),_0x1f2c51,_0x1f7ed3[_0x12e0('0x15')][_0x12e0('0x17')]);return _0x186429(_0x1f7ed3['error'][_0x12e0('0x17')]);}else{logger[_0x12e0('0x18')](_0x12e0('0x11'),_0x1f2c51,_0x12e0('0x13'));_0x186429(_0x1f7ed3[_0x12e0('0x19')][_0x12e0('0x17')]);}})[_0x12e0('0x1a')](function(_0x543651){logger[_0x12e0('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x1f2c51,_0x543651);_0x249bcf(_0x543651);});});}exports[_0x12e0('0x1b')]=function(_0x3e97d7){var _0x1e4d52=this;return new Promise(function(_0x5738ac,_0x42fed9){return db[_0x12e0('0x1c')][_0x12e0('0x1d')]({'raw':_0x3e97d7[_0x12e0('0x1e')]?_0x3e97d7[_0x12e0('0x1e')][_0x12e0('0x1f')]===undefined?!![]:![]:!![],'where':_0x3e97d7[_0x12e0('0x1e')]?_0x3e97d7[_0x12e0('0x1e')][_0x12e0('0x20')]||null:null,'attributes':_0x3e97d7[_0x12e0('0x1e')]?_0x3e97d7['options']['attributes']||null:null,'limit':_0x3e97d7[_0x12e0('0x1e')]?_0x3e97d7[_0x12e0('0x1e')][_0x12e0('0x21')]||null:null,'include':_0x3e97d7['options']?_0x3e97d7['options'][_0x12e0('0x22')]?_[_0x12e0('0x23')](_0x3e97d7[_0x12e0('0x1e')][_0x12e0('0x22')],function(_0x5524ad){return{'model':db[_0x5524ad[_0x12e0('0x24')]],'as':_0x5524ad['as'],'attributes':_0x5524ad[_0x12e0('0x25')],'include':_0x5524ad[_0x12e0('0x22')]?_[_0x12e0('0x23')](_0x5524ad[_0x12e0('0x22')],function(_0x420bb2){return{'model':db[_0x420bb2['model']],'as':_0x420bb2['as'],'attributes':_0x420bb2[_0x12e0('0x25')],'include':_0x420bb2[_0x12e0('0x22')]?_[_0x12e0('0x23')](_0x420bb2[_0x12e0('0x22')],function(_0x410d9e){return{'model':db[_0x410d9e[_0x12e0('0x24')]],'as':_0x410d9e['as'],'attributes':_0x410d9e[_0x12e0('0x25')]};}):[]};}):[]};}):[]:[]})[_0x12e0('0x10')](function(_0x2cfbf4){logger[_0x12e0('0x18')](_0x12e0('0x1b'),_0x3e97d7);logger[_0x12e0('0x12')](_0x12e0('0x1b'),_0x3e97d7,JSON['stringify'](_0x2cfbf4));_0x5738ac(_0x2cfbf4);})[_0x12e0('0x1a')](function(_0x10fa47){logger['error'](_0x12e0('0x1b'),_0x10fa47['message'],_0x3e97d7);_0x42fed9(_0x1e4d52[_0x12e0('0x15')](0x1f4,_0x10fa47['message']));});});};exports['ShowOpenchannelQueue']=function(_0x120ce6){var _0x13482a=this;return new Promise(function(_0x49bd0f,_0x31756d){return db['OpenchannelQueue'][_0x12e0('0x26')]({'raw':_0x120ce6[_0x12e0('0x1e')]?_0x120ce6[_0x12e0('0x1e')][_0x12e0('0x1f')]===undefined?!![]:![]:!![],'where':_0x120ce6[_0x12e0('0x1e')]?_0x120ce6[_0x12e0('0x1e')]['where']||null:null,'attributes':_0x120ce6[_0x12e0('0x1e')]?_0x120ce6['options'][_0x12e0('0x25')]||null:null,'include':_0x120ce6[_0x12e0('0x1e')]?_0x120ce6['options'][_0x12e0('0x22')]?_['map'](_0x120ce6[_0x12e0('0x1e')][_0x12e0('0x22')],function(_0x2f570e){return{'model':db[_0x2f570e['model']],'as':_0x2f570e['as'],'attributes':_0x2f570e[_0x12e0('0x25')],'include':_0x2f570e['include']?_[_0x12e0('0x23')](_0x2f570e['include'],function(_0x3cfc42){return{'model':db[_0x3cfc42['model']],'as':_0x3cfc42['as'],'attributes':_0x3cfc42['attributes'],'include':_0x3cfc42['include']?_[_0x12e0('0x23')](_0x3cfc42[_0x12e0('0x22')],function(_0xb634d8){return{'model':db[_0xb634d8[_0x12e0('0x24')]],'as':_0xb634d8['as'],'attributes':_0xb634d8[_0x12e0('0x25')]};}):[]};}):[]};}):[]:[]})[_0x12e0('0x10')](function(_0x1715d7){logger[_0x12e0('0x18')](_0x12e0('0x27'),_0x120ce6);logger[_0x12e0('0x12')](_0x12e0('0x27'),_0x120ce6,JSON['stringify'](_0x1715d7));_0x49bd0f(_0x1715d7);})[_0x12e0('0x1a')](function(_0xbb98cc){logger[_0x12e0('0x15')](_0x12e0('0x27'),_0xbb98cc[_0x12e0('0x17')],_0x120ce6);_0x31756d(_0x13482a[_0x12e0('0x15')](0x1f4,_0xbb98cc[_0x12e0('0x17')]));});});};
\ No newline at end of file
+var _0xa309=['OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','OpenchannelQueue,\x20%s,\x20%s','info','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','limit','include','map','attributes','model','then','stringify','ShowOpenchannelQueue','raw','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','request\x20sent','debug'];(function(_0x34c0f1,_0x52ee0c){var _0xabef14=function(_0x27f20a){while(--_0x27f20a){_0x34c0f1['push'](_0x34c0f1['shift']());}};_0xabef14(++_0x52ee0c);}(_0xa309,0x1cd));var _0x9a30=function(_0x1a4e5a,_0x4cd134){_0x1a4e5a=_0x1a4e5a-0x0;var _0x28e285=_0xa309[_0x1a4e5a];return _0x28e285;};'use strict';var _=require('lodash');var util=require(_0x9a30('0x0'));var moment=require('moment');var BPromise=require(_0x9a30('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9a30('0x2'));var db=require(_0x9a30('0x3'))['db'];var utils=require(_0x9a30('0x4'));var logger=require(_0x9a30('0x5'))('rpc');var config=require(_0x9a30('0x6'));var jayson=require(_0x9a30('0x7'));var client=jayson[_0x9a30('0x8')][_0x9a30('0x9')]({'port':0x232a});config[_0x9a30('0xa')]=_[_0x9a30('0xb')](config[_0x9a30('0xa')],{'host':_0x9a30('0xc'),'port':0x18eb});var socket=require(_0x9a30('0xd'))(new Redis(config['redis']));require(_0x9a30('0xe'))[_0x9a30('0xf')](socket);function respondWithRpcPromise(_0x180e9c,_0x22558b,_0x197071){return new BPromise(function(_0x4d405d,_0x55a70a){return client[_0x9a30('0x10')](_0x180e9c,_0x197071)['then'](function(_0x2fc78d){logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x9a30('0x11'));logger[_0x9a30('0x12')](_0x9a30('0x13'),_0x22558b,_0x9a30('0x11'),JSON['stringify'](_0x2fc78d));if(_0x2fc78d[_0x9a30('0x14')]){if(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x15')]===0x1f4){logger[_0x9a30('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);return _0x55a70a(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);}logger['error'](_0x9a30('0x17'),_0x22558b,_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);return _0x4d405d(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);}else{logger[_0x9a30('0x18')]('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x9a30('0x11'));_0x4d405d(_0x2fc78d[_0x9a30('0x19')]['message']);}})[_0x9a30('0x1a')](function(_0x1d4c39){logger[_0x9a30('0x14')](_0x9a30('0x17'),_0x22558b,_0x1d4c39);_0x55a70a(_0x1d4c39);});});}exports[_0x9a30('0x1b')]=function(_0x4a5d0e){var _0x12f126=this;return new Promise(function(_0x5b620d,_0x1b1a9c){return db[_0x9a30('0x1c')][_0x9a30('0x1d')]({'raw':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['where']||null:null,'attributes':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['attributes']||null:null,'limit':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x1f')]||null:null,'include':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x20')],function(_0x293f2a){return{'model':db[_0x293f2a['model']],'as':_0x293f2a['as'],'attributes':_0x293f2a[_0x9a30('0x22')],'include':_0x293f2a[_0x9a30('0x20')]?_['map'](_0x293f2a['include'],function(_0x3a398a){return{'model':db[_0x3a398a[_0x9a30('0x23')]],'as':_0x3a398a['as'],'attributes':_0x3a398a[_0x9a30('0x22')],'include':_0x3a398a[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x3a398a[_0x9a30('0x20')],function(_0xa1cd97){return{'model':db[_0xa1cd97[_0x9a30('0x23')]],'as':_0xa1cd97['as'],'attributes':_0xa1cd97[_0x9a30('0x22')]};}):[]};}):[]};}):[]:[]})[_0x9a30('0x24')](function(_0x379b78){logger[_0x9a30('0x18')](_0x9a30('0x1b'),_0x4a5d0e);logger[_0x9a30('0x12')]('GetOpenchannelQueue',_0x4a5d0e,JSON[_0x9a30('0x25')](_0x379b78));_0x5b620d(_0x379b78);})['catch'](function(_0x48b5b0){logger[_0x9a30('0x14')](_0x9a30('0x1b'),_0x48b5b0[_0x9a30('0x16')],_0x4a5d0e);_0x1b1a9c(_0x12f126['error'](0x1f4,_0x48b5b0[_0x9a30('0x16')]));});});};exports[_0x9a30('0x26')]=function(_0x523f97){var _0x13e2a0=this;return new Promise(function(_0x4f6d8b,_0x24592f){return db[_0x9a30('0x1c')]['find']({'raw':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')][_0x9a30('0x27')]===undefined?!![]:![]:!![],'where':_0x523f97['options']?_0x523f97[_0x9a30('0x1e')]['where']||null:null,'attributes':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')][_0x9a30('0x22')]||null:null,'include':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')]['include']?_[_0x9a30('0x21')](_0x523f97[_0x9a30('0x1e')][_0x9a30('0x20')],function(_0x1cc58b){return{'model':db[_0x1cc58b[_0x9a30('0x23')]],'as':_0x1cc58b['as'],'attributes':_0x1cc58b['attributes'],'include':_0x1cc58b[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x1cc58b[_0x9a30('0x20')],function(_0x2672c2){return{'model':db[_0x2672c2[_0x9a30('0x23')]],'as':_0x2672c2['as'],'attributes':_0x2672c2[_0x9a30('0x22')],'include':_0x2672c2[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x2672c2[_0x9a30('0x20')],function(_0x3325cd){return{'model':db[_0x3325cd[_0x9a30('0x23')]],'as':_0x3325cd['as'],'attributes':_0x3325cd['attributes']};}):[]};}):[]};}):[]:[]})[_0x9a30('0x24')](function(_0x26d4a2){logger[_0x9a30('0x18')]('ShowOpenchannelQueue',_0x523f97);logger[_0x9a30('0x12')](_0x9a30('0x26'),_0x523f97,JSON[_0x9a30('0x25')](_0x26d4a2));_0x4f6d8b(_0x26d4a2);})[_0x9a30('0x1a')](function(_0x1be9fb){logger['error'](_0x9a30('0x26'),_0x1be9fb['message'],_0x523f97);_0x24592f(_0x13e2a0['error'](0x1f4,_0x1be9fb[_0x9a30('0x16')]));});});};
\ No newline at end of file