Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 49b81fc..e39c6f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe324=['where','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetOpenchannelQueue','OpenchannelQueue','options','raw','limit','include','map','model','attributes','catch','ShowOpenchannelQueue','find'];(function(_0x2a7979,_0x5e2b17){var _0x53134e=function(_0x2103cb){while(--_0x2103cb){_0x2a7979['push'](_0x2a7979['shift']());}};_0x53134e(++_0x5e2b17);}(_0xe324,0xa1));var _0x4e32=function(_0x368e09,_0x2c1517){_0x368e09=_0x368e09-0x0;var _0x14b7df=_0xe324[_0x368e09];return _0x14b7df;};'use strict';var _=require(_0x4e32('0x0'));var util=require('util');var moment=require(_0x4e32('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4e32('0x2'));var db=require(_0x4e32('0x3'))['db'];var utils=require(_0x4e32('0x4'));var logger=require(_0x4e32('0x5'))(_0x4e32('0x6'));var config=require(_0x4e32('0x7'));var jayson=require(_0x4e32('0x8'));var client=jayson[_0x4e32('0x9')][_0x4e32('0xa')]({'port':0x232a});config[_0x4e32('0xb')]=_[_0x4e32('0xc')](config[_0x4e32('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x4e32('0xd'))(new Redis(config['redis']));require(_0x4e32('0xe'))[_0x4e32('0xf')](socket);function respondWithRpcPromise(_0x2bc51f,_0x1b764c,_0x409e30){return new BPromise(function(_0x623b1f,_0x1f3928){return client[_0x4e32('0x10')](_0x2bc51f,_0x409e30)[_0x4e32('0x11')](function(_0x10da51){logger[_0x4e32('0x12')](_0x4e32('0x13'),_0x1b764c,_0x4e32('0x14'));logger[_0x4e32('0x15')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x1b764c,_0x4e32('0x14'),JSON[_0x4e32('0x16')](_0x10da51));if(_0x10da51[_0x4e32('0x17')]){if(_0x10da51[_0x4e32('0x17')][_0x4e32('0x18')]===0x1f4){logger[_0x4e32('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x1b764c,_0x10da51[_0x4e32('0x17')]['message']);return _0x1f3928(_0x10da51[_0x4e32('0x17')][_0x4e32('0x19')]);}logger[_0x4e32('0x17')](_0x4e32('0x13'),_0x1b764c,_0x10da51[_0x4e32('0x17')][_0x4e32('0x19')]);return _0x623b1f(_0x10da51[_0x4e32('0x17')]['message']);}else{logger[_0x4e32('0x12')](_0x4e32('0x13'),_0x1b764c,_0x4e32('0x14'));_0x623b1f(_0x10da51[_0x4e32('0x1a')]['message']);}})['catch'](function(_0x4661e3){logger[_0x4e32('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x1b764c,_0x4661e3);_0x1f3928(_0x4661e3);});});}exports[_0x4e32('0x1b')]=function(_0x578c11){var _0x4deddd=this;return new Promise(function(_0x174b81,_0x48c4cc){return db[_0x4e32('0x1c')]['findAll']({'raw':_0x578c11[_0x4e32('0x1d')]?_0x578c11[_0x4e32('0x1d')][_0x4e32('0x1e')]===undefined?!![]:![]:!![],'where':_0x578c11[_0x4e32('0x1d')]?_0x578c11[_0x4e32('0x1d')]['where']||null:null,'attributes':_0x578c11['options']?_0x578c11[_0x4e32('0x1d')]['attributes']||null:null,'limit':_0x578c11[_0x4e32('0x1d')]?_0x578c11['options'][_0x4e32('0x1f')]||null:null,'include':_0x578c11[_0x4e32('0x1d')]?_0x578c11[_0x4e32('0x1d')][_0x4e32('0x20')]?_[_0x4e32('0x21')](_0x578c11[_0x4e32('0x1d')][_0x4e32('0x20')],function(_0x255673){return{'model':db[_0x255673[_0x4e32('0x22')]],'as':_0x255673['as'],'attributes':_0x255673[_0x4e32('0x23')],'include':_0x255673[_0x4e32('0x20')]?_['map'](_0x255673['include'],function(_0x4f3103){return{'model':db[_0x4f3103['model']],'as':_0x4f3103['as'],'attributes':_0x4f3103['attributes'],'include':_0x4f3103['include']?_[_0x4e32('0x21')](_0x4f3103[_0x4e32('0x20')],function(_0x1afc35){return{'model':db[_0x1afc35[_0x4e32('0x22')]],'as':_0x1afc35['as'],'attributes':_0x1afc35[_0x4e32('0x23')]};}):[]};}):[]};}):[]:[]})[_0x4e32('0x11')](function(_0x15bd02){logger['info'](_0x4e32('0x1b'),_0x578c11);logger['debug'](_0x4e32('0x1b'),_0x578c11,JSON[_0x4e32('0x16')](_0x15bd02));_0x174b81(_0x15bd02);})[_0x4e32('0x24')](function(_0x5b15fb){logger[_0x4e32('0x17')](_0x4e32('0x1b'),_0x5b15fb['message'],_0x578c11);_0x48c4cc(_0x4deddd[_0x4e32('0x17')](0x1f4,_0x5b15fb[_0x4e32('0x19')]));});});};exports[_0x4e32('0x25')]=function(_0x2e3cfc){var _0xa49f8a=this;return new Promise(function(_0x47a581,_0x255663){return db['OpenchannelQueue'][_0x4e32('0x26')]({'raw':_0x2e3cfc['options']?_0x2e3cfc[_0x4e32('0x1d')][_0x4e32('0x1e')]===undefined?!![]:![]:!![],'where':_0x2e3cfc[_0x4e32('0x1d')]?_0x2e3cfc['options'][_0x4e32('0x27')]||null:null,'attributes':_0x2e3cfc[_0x4e32('0x1d')]?_0x2e3cfc[_0x4e32('0x1d')][_0x4e32('0x23')]||null:null,'include':_0x2e3cfc[_0x4e32('0x1d')]?_0x2e3cfc[_0x4e32('0x1d')][_0x4e32('0x20')]?_[_0x4e32('0x21')](_0x2e3cfc[_0x4e32('0x1d')][_0x4e32('0x20')],function(_0x493864){return{'model':db[_0x493864['model']],'as':_0x493864['as'],'attributes':_0x493864[_0x4e32('0x23')],'include':_0x493864[_0x4e32('0x20')]?_[_0x4e32('0x21')](_0x493864[_0x4e32('0x20')],function(_0x163bc8){return{'model':db[_0x163bc8[_0x4e32('0x22')]],'as':_0x163bc8['as'],'attributes':_0x163bc8[_0x4e32('0x23')],'include':_0x163bc8[_0x4e32('0x20')]?_[_0x4e32('0x21')](_0x163bc8[_0x4e32('0x20')],function(_0xfc55fe){return{'model':db[_0xfc55fe['model']],'as':_0xfc55fe['as'],'attributes':_0xfc55fe[_0x4e32('0x23')]};}):[]};}):[]};}):[]:[]})[_0x4e32('0x11')](function(_0x4927da){logger[_0x4e32('0x12')](_0x4e32('0x25'),_0x2e3cfc);logger[_0x4e32('0x15')](_0x4e32('0x25'),_0x2e3cfc,JSON[_0x4e32('0x16')](_0x4927da));_0x47a581(_0x4927da);})[_0x4e32('0x24')](function(_0x2b2540){logger[_0x4e32('0x17')](_0x4e32('0x25'),_0x2b2540[_0x4e32('0x19')],_0x2e3cfc);_0x255663(_0xa49f8a['error'](0x1f4,_0x2b2540[_0x4e32('0x19')]));});});};
\ 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