Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index a872060..d0de860 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0674=['./openchannelQueue.socket','request','then','info','request\x20sent','debug','stringify','error','code','message','OpenchannelQueue,\x20%s,\x20%s','catch','GetOpenchannelQueue','findAll','options','raw','where','limit','include','map','model','attributes','OpenchannelQueue','find','ShowOpenchannelQueue','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost'];(function(_0x2c087f,_0x22ef50){var _0xcacad0=function(_0x47fc7c){while(--_0x47fc7c){_0x2c087f['push'](_0x2c087f['shift']());}};_0xcacad0(++_0x22ef50);}(_0x0674,0x19f));var _0x4067=function(_0x1d7ccd,_0x1edd56){_0x1d7ccd=_0x1d7ccd-0x0;var _0x47e690=_0x0674[_0x1d7ccd];return _0x47e690;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4067('0x0'));var BPromise=require(_0x4067('0x1'));var rs=require(_0x4067('0x2'));var fs=require('fs');var Redis=require(_0x4067('0x3'));var db=require(_0x4067('0x4'))['db'];var utils=require(_0x4067('0x5'));var logger=require(_0x4067('0x6'))(_0x4067('0x7'));var config=require(_0x4067('0x8'));var jayson=require(_0x4067('0x9'));var client=jayson[_0x4067('0xa')][_0x4067('0xb')]({'port':0x232a});config['redis']=_[_0x4067('0xc')](config['redis'],{'host':_0x4067('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x4067('0xe'))['register'](socket);function respondWithRpcPromise(_0x439eb9,_0x3a9cc0,_0x44a3df){return new BPromise(function(_0x4fcd9f,_0x4c2113){return client[_0x4067('0xf')](_0x439eb9,_0x44a3df)[_0x4067('0x10')](function(_0x47646a){logger[_0x4067('0x11')]('OpenchannelQueue,\x20%s,\x20%s',_0x3a9cc0,_0x4067('0x12'));logger[_0x4067('0x13')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x3a9cc0,_0x4067('0x12'),JSON[_0x4067('0x14')](_0x47646a));if(_0x47646a[_0x4067('0x15')]){if(_0x47646a[_0x4067('0x15')][_0x4067('0x16')]===0x1f4){logger[_0x4067('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x3a9cc0,_0x47646a[_0x4067('0x15')][_0x4067('0x17')]);return _0x4c2113(_0x47646a[_0x4067('0x15')]['message']);}logger[_0x4067('0x15')](_0x4067('0x18'),_0x3a9cc0,_0x47646a[_0x4067('0x15')]['message']);return _0x4fcd9f(_0x47646a[_0x4067('0x15')][_0x4067('0x17')]);}else{logger['info'](_0x4067('0x18'),_0x3a9cc0,_0x4067('0x12'));_0x4fcd9f(_0x47646a['result'][_0x4067('0x17')]);}})[_0x4067('0x19')](function(_0x52a761){logger[_0x4067('0x15')]('OpenchannelQueue,\x20%s,\x20%s',_0x3a9cc0,_0x52a761);_0x4c2113(_0x52a761);});});}exports[_0x4067('0x1a')]=function(_0x580976){var _0x57365c=this;return new Promise(function(_0x39152e,_0x483aa2){return db['OpenchannelQueue'][_0x4067('0x1b')]({'raw':_0x580976['options']?_0x580976[_0x4067('0x1c')][_0x4067('0x1d')]===undefined?!![]:![]:!![],'where':_0x580976[_0x4067('0x1c')]?_0x580976[_0x4067('0x1c')][_0x4067('0x1e')]||null:null,'attributes':_0x580976[_0x4067('0x1c')]?_0x580976[_0x4067('0x1c')]['attributes']||null:null,'limit':_0x580976[_0x4067('0x1c')]?_0x580976[_0x4067('0x1c')][_0x4067('0x1f')]||null:null,'include':_0x580976[_0x4067('0x1c')]?_0x580976[_0x4067('0x1c')][_0x4067('0x20')]?_[_0x4067('0x21')](_0x580976[_0x4067('0x1c')]['include'],function(_0x9aa0fc){return{'model':db[_0x9aa0fc[_0x4067('0x22')]],'as':_0x9aa0fc['as'],'attributes':_0x9aa0fc[_0x4067('0x23')],'include':_0x9aa0fc[_0x4067('0x20')]?_[_0x4067('0x21')](_0x9aa0fc[_0x4067('0x20')],function(_0x144c60){return{'model':db[_0x144c60[_0x4067('0x22')]],'as':_0x144c60['as'],'attributes':_0x144c60['attributes'],'include':_0x144c60['include']?_[_0x4067('0x21')](_0x144c60[_0x4067('0x20')],function(_0x2e12ec){return{'model':db[_0x2e12ec[_0x4067('0x22')]],'as':_0x2e12ec['as'],'attributes':_0x2e12ec[_0x4067('0x23')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4f7765){logger[_0x4067('0x11')]('GetOpenchannelQueue',_0x580976);logger['debug'](_0x4067('0x1a'),_0x580976,JSON[_0x4067('0x14')](_0x4f7765));_0x39152e(_0x4f7765);})[_0x4067('0x19')](function(_0x54db4d){logger['error'](_0x4067('0x1a'),_0x54db4d[_0x4067('0x17')],_0x580976);_0x483aa2(_0x57365c['error'](0x1f4,_0x54db4d[_0x4067('0x17')]));});});};exports['ShowOpenchannelQueue']=function(_0x1554ac){var _0x62359=this;return new Promise(function(_0x46025f,_0x1a0b64){return db[_0x4067('0x24')][_0x4067('0x25')]({'raw':_0x1554ac[_0x4067('0x1c')]?_0x1554ac[_0x4067('0x1c')][_0x4067('0x1d')]===undefined?!![]:![]:!![],'where':_0x1554ac[_0x4067('0x1c')]?_0x1554ac[_0x4067('0x1c')][_0x4067('0x1e')]||null:null,'attributes':_0x1554ac[_0x4067('0x1c')]?_0x1554ac[_0x4067('0x1c')]['attributes']||null:null,'include':_0x1554ac[_0x4067('0x1c')]?_0x1554ac[_0x4067('0x1c')]['include']?_[_0x4067('0x21')](_0x1554ac['options']['include'],function(_0x2ff5bf){return{'model':db[_0x2ff5bf[_0x4067('0x22')]],'as':_0x2ff5bf['as'],'attributes':_0x2ff5bf[_0x4067('0x23')],'include':_0x2ff5bf['include']?_[_0x4067('0x21')](_0x2ff5bf['include'],function(_0x275417){return{'model':db[_0x275417['model']],'as':_0x275417['as'],'attributes':_0x275417[_0x4067('0x23')],'include':_0x275417[_0x4067('0x20')]?_[_0x4067('0x21')](_0x275417[_0x4067('0x20')],function(_0xcae366){return{'model':db[_0xcae366[_0x4067('0x22')]],'as':_0xcae366['as'],'attributes':_0xcae366[_0x4067('0x23')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x184f56){logger[_0x4067('0x11')](_0x4067('0x26'),_0x1554ac);logger[_0x4067('0x13')](_0x4067('0x26'),_0x1554ac,JSON[_0x4067('0x14')](_0x184f56));_0x46025f(_0x184f56);})[_0x4067('0x19')](function(_0x4bbce5){logger[_0x4067('0x15')](_0x4067('0x26'),_0x4bbce5['message'],_0x1554ac);_0x1a0b64(_0x62359['error'](0x1f4,_0x4bbce5['message']));});});};
\ No newline at end of file
+var _0xb08b=['request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','limit','include','map','model','attributes','ShowOpenchannelQueue','find','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','redis','defaults','socket.io-emitter','./openchannelQueue.socket','register'];(function(_0x7acd9c,_0x4ebb68){var _0x4af9d8=function(_0x1e05de){while(--_0x1e05de){_0x7acd9c['push'](_0x7acd9c['shift']());}};_0x4af9d8(++_0x4ebb68);}(_0xb08b,0x1c6));var _0xbb08=function(_0x534c87,_0xcc83cb){_0x534c87=_0x534c87-0x0;var _0x467a74=_0xb08b[_0x534c87];return _0x467a74;};'use strict';var _=require(_0xbb08('0x0'));var util=require('util');var moment=require(_0xbb08('0x1'));var BPromise=require(_0xbb08('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbb08('0x3'));var db=require(_0xbb08('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xbb08('0x5'))(_0xbb08('0x6'));var config=require(_0xbb08('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xbb08('0x8')]({'port':0x232a});config[_0xbb08('0x9')]=_[_0xbb08('0xa')](config[_0xbb08('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xbb08('0xb'))(new Redis(config[_0xbb08('0x9')]));require(_0xbb08('0xc'))[_0xbb08('0xd')](socket);function respondWithRpcPromise(_0x4af592,_0x36f63f,_0x39dc13){return new BPromise(function(_0x5370f1,_0x228faf){return client[_0xbb08('0xe')](_0x4af592,_0x39dc13)[_0xbb08('0xf')](function(_0x275f40){logger[_0xbb08('0x10')](_0xbb08('0x11'),_0x36f63f,_0xbb08('0x12'));logger[_0xbb08('0x13')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x36f63f,'request\x20sent',JSON[_0xbb08('0x14')](_0x275f40));if(_0x275f40[_0xbb08('0x15')]){if(_0x275f40['error'][_0xbb08('0x16')]===0x1f4){logger['error'](_0xbb08('0x11'),_0x36f63f,_0x275f40[_0xbb08('0x15')][_0xbb08('0x17')]);return _0x228faf(_0x275f40[_0xbb08('0x15')][_0xbb08('0x17')]);}logger[_0xbb08('0x15')](_0xbb08('0x11'),_0x36f63f,_0x275f40[_0xbb08('0x15')][_0xbb08('0x17')]);return _0x5370f1(_0x275f40['error'][_0xbb08('0x17')]);}else{logger[_0xbb08('0x10')]('OpenchannelQueue,\x20%s,\x20%s',_0x36f63f,_0xbb08('0x12'));_0x5370f1(_0x275f40[_0xbb08('0x18')]['message']);}})[_0xbb08('0x19')](function(_0x3a261d){logger[_0xbb08('0x15')](_0xbb08('0x11'),_0x36f63f,_0x3a261d);_0x228faf(_0x3a261d);});});}exports[_0xbb08('0x1a')]=function(_0x4e36a0){var _0x2bad09=this;return new Promise(function(_0x123fe5,_0x1501f8){return db[_0xbb08('0x1b')][_0xbb08('0x1c')]({'raw':_0x4e36a0[_0xbb08('0x1d')]?_0x4e36a0[_0xbb08('0x1d')][_0xbb08('0x1e')]===undefined?!![]:![]:!![],'where':_0x4e36a0[_0xbb08('0x1d')]?_0x4e36a0[_0xbb08('0x1d')][_0xbb08('0x1f')]||null:null,'attributes':_0x4e36a0['options']?_0x4e36a0[_0xbb08('0x1d')]['attributes']||null:null,'limit':_0x4e36a0[_0xbb08('0x1d')]?_0x4e36a0[_0xbb08('0x1d')][_0xbb08('0x20')]||null:null,'include':_0x4e36a0[_0xbb08('0x1d')]?_0x4e36a0[_0xbb08('0x1d')][_0xbb08('0x21')]?_[_0xbb08('0x22')](_0x4e36a0[_0xbb08('0x1d')]['include'],function(_0x360b80){return{'model':db[_0x360b80[_0xbb08('0x23')]],'as':_0x360b80['as'],'attributes':_0x360b80[_0xbb08('0x24')],'include':_0x360b80[_0xbb08('0x21')]?_[_0xbb08('0x22')](_0x360b80[_0xbb08('0x21')],function(_0x3a7396){return{'model':db[_0x3a7396['model']],'as':_0x3a7396['as'],'attributes':_0x3a7396['attributes'],'include':_0x3a7396[_0xbb08('0x21')]?_[_0xbb08('0x22')](_0x3a7396[_0xbb08('0x21')],function(_0x53e72e){return{'model':db[_0x53e72e[_0xbb08('0x23')]],'as':_0x53e72e['as'],'attributes':_0x53e72e[_0xbb08('0x24')]};}):[]};}):[]};}):[]:[]})[_0xbb08('0xf')](function(_0x8d53c4){logger['info'](_0xbb08('0x1a'),_0x4e36a0);logger[_0xbb08('0x13')](_0xbb08('0x1a'),_0x4e36a0,JSON['stringify'](_0x8d53c4));_0x123fe5(_0x8d53c4);})[_0xbb08('0x19')](function(_0x4ed8ea){logger['error'](_0xbb08('0x1a'),_0x4ed8ea[_0xbb08('0x17')],_0x4e36a0);_0x1501f8(_0x2bad09['error'](0x1f4,_0x4ed8ea[_0xbb08('0x17')]));});});};exports[_0xbb08('0x25')]=function(_0x53698e){var _0x5c2568=this;return new Promise(function(_0x2ecfac,_0x37a97d){return db[_0xbb08('0x1b')][_0xbb08('0x26')]({'raw':_0x53698e[_0xbb08('0x1d')]?_0x53698e[_0xbb08('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x53698e['options']?_0x53698e['options'][_0xbb08('0x1f')]||null:null,'attributes':_0x53698e['options']?_0x53698e[_0xbb08('0x1d')][_0xbb08('0x24')]||null:null,'include':_0x53698e['options']?_0x53698e[_0xbb08('0x1d')][_0xbb08('0x21')]?_[_0xbb08('0x22')](_0x53698e[_0xbb08('0x1d')][_0xbb08('0x21')],function(_0x4001c6){return{'model':db[_0x4001c6[_0xbb08('0x23')]],'as':_0x4001c6['as'],'attributes':_0x4001c6[_0xbb08('0x24')],'include':_0x4001c6['include']?_[_0xbb08('0x22')](_0x4001c6[_0xbb08('0x21')],function(_0x25d177){return{'model':db[_0x25d177[_0xbb08('0x23')]],'as':_0x25d177['as'],'attributes':_0x25d177[_0xbb08('0x24')],'include':_0x25d177[_0xbb08('0x21')]?_[_0xbb08('0x22')](_0x25d177[_0xbb08('0x21')],function(_0x3d3137){return{'model':db[_0x3d3137[_0xbb08('0x23')]],'as':_0x3d3137['as'],'attributes':_0x3d3137['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x58e612){logger['info'](_0xbb08('0x25'),_0x53698e);logger[_0xbb08('0x13')](_0xbb08('0x25'),_0x53698e,JSON[_0xbb08('0x14')](_0x58e612));_0x2ecfac(_0x58e612);})[_0xbb08('0x19')](function(_0x1194c7){logger[_0xbb08('0x15')](_0xbb08('0x25'),_0x1194c7['message'],_0x53698e);_0x37a97d(_0x5c2568[_0xbb08('0x15')](0x1f4,_0x1194c7[_0xbb08('0x17')]));});});};
\ No newline at end of file