Built motion from commit (unavailable).|2.5.9
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 764fc89..8f10391 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a96=['localhost','./openchannelQueue.socket','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelQueue,\x20%s,\x20%s','message','result','catch','OpenchannelQueue','options','raw','where','limit','map','model','attributes','include','GetOpenchannelQueue','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','redis'];(function(_0xe70390,_0x916157){var _0x36b28f=function(_0x559e2d){while(--_0x559e2d){_0xe70390['push'](_0xe70390['shift']());}};_0x36b28f(++_0x916157);}(_0x4a96,0x88));var _0x64a9=function(_0x5bb4a,_0xfb4035){_0x5bb4a=_0x5bb4a-0x0;var _0x5d0b0c=_0x4a96[_0x5bb4a];return _0x5d0b0c;};'use strict';var _=require(_0x64a9('0x0'));var util=require(_0x64a9('0x1'));var moment=require(_0x64a9('0x2'));var BPromise=require(_0x64a9('0x3'));var rs=require(_0x64a9('0x4'));var fs=require('fs');var Redis=require(_0x64a9('0x5'));var db=require(_0x64a9('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x64a9('0x7'));var jayson=require(_0x64a9('0x8'));var client=jayson[_0x64a9('0x9')][_0x64a9('0xa')]({'port':0x232a});config[_0x64a9('0xb')]=_['defaults'](config[_0x64a9('0xb')],{'host':_0x64a9('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x64a9('0xd'))['register'](socket);function respondWithRpcPromise(_0x3f30b2,_0x57d00c,_0x5bdf76){return new BPromise(function(_0x1b6af5,_0x2965d0){return client[_0x64a9('0xe')](_0x3f30b2,_0x5bdf76)[_0x64a9('0xf')](function(_0x2454e8){logger[_0x64a9('0x10')]('OpenchannelQueue,\x20%s,\x20%s',_0x57d00c,_0x64a9('0x11'));logger[_0x64a9('0x12')](_0x64a9('0x13'),_0x57d00c,_0x64a9('0x11'),JSON[_0x64a9('0x14')](_0x2454e8));if(_0x2454e8[_0x64a9('0x15')]){if(_0x2454e8[_0x64a9('0x15')]['code']===0x1f4){logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x2454e8[_0x64a9('0x15')][_0x64a9('0x17')]);return _0x2965d0(_0x2454e8[_0x64a9('0x15')][_0x64a9('0x17')]);}logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x2454e8['error'][_0x64a9('0x17')]);return _0x1b6af5(_0x2454e8['error'][_0x64a9('0x17')]);}else{logger['info'](_0x64a9('0x16'),_0x57d00c,_0x64a9('0x11'));_0x1b6af5(_0x2454e8[_0x64a9('0x18')][_0x64a9('0x17')]);}})[_0x64a9('0x19')](function(_0x14313e){logger[_0x64a9('0x15')](_0x64a9('0x16'),_0x57d00c,_0x14313e);_0x2965d0(_0x14313e);});});}exports['GetOpenchannelQueue']=function(_0x3ef0b0){var _0x49023a=this;return new Promise(function(_0x15acf9,_0xe941bc){return db[_0x64a9('0x1a')]['findAll']({'raw':_0x3ef0b0['options']?_0x3ef0b0[_0x64a9('0x1b')][_0x64a9('0x1c')]===undefined?!![]:![]:!![],'where':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0[_0x64a9('0x1b')][_0x64a9('0x1d')]||null:null,'attributes':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0[_0x64a9('0x1b')]['attributes']||null:null,'limit':_0x3ef0b0[_0x64a9('0x1b')]?_0x3ef0b0['options'][_0x64a9('0x1e')]||null:null,'include':_0x3ef0b0['options']?_0x3ef0b0[_0x64a9('0x1b')]['include']?_[_0x64a9('0x1f')](_0x3ef0b0[_0x64a9('0x1b')]['include'],function(_0x5c0d62){return{'model':db[_0x5c0d62[_0x64a9('0x20')]],'as':_0x5c0d62['as'],'attributes':_0x5c0d62[_0x64a9('0x21')],'include':_0x5c0d62[_0x64a9('0x22')]?_['map'](_0x5c0d62[_0x64a9('0x22')],function(_0x98f7a0){return{'model':db[_0x98f7a0[_0x64a9('0x20')]],'as':_0x98f7a0['as'],'attributes':_0x98f7a0[_0x64a9('0x21')],'include':_0x98f7a0['include']?_[_0x64a9('0x1f')](_0x98f7a0[_0x64a9('0x22')],function(_0x33b35b){return{'model':db[_0x33b35b['model']],'as':_0x33b35b['as'],'attributes':_0x33b35b[_0x64a9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x64a9('0xf')](function(_0x5f4772){logger['info']('GetOpenchannelQueue',_0x3ef0b0);logger[_0x64a9('0x12')](_0x64a9('0x23'),_0x3ef0b0,JSON['stringify'](_0x5f4772));_0x15acf9(_0x5f4772);})[_0x64a9('0x19')](function(_0x22eeec){logger['error'](_0x64a9('0x23'),_0x22eeec['message'],_0x3ef0b0);_0xe941bc(_0x49023a[_0x64a9('0x15')](0x1f4,_0x22eeec[_0x64a9('0x17')]));});});};exports[_0x64a9('0x24')]=function(_0x49fd9f){var _0x4f32ef=this;return new Promise(function(_0x567a76,_0x5d1fbc){return db[_0x64a9('0x1a')]['find']({'raw':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f['options'][_0x64a9('0x1c')]===undefined?!![]:![]:!![],'where':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x1d')]||null:null,'attributes':_0x49fd9f['options']?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x21')]||null:null,'include':_0x49fd9f[_0x64a9('0x1b')]?_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x22')]?_[_0x64a9('0x1f')](_0x49fd9f[_0x64a9('0x1b')][_0x64a9('0x22')],function(_0x18c5a0){return{'model':db[_0x18c5a0['model']],'as':_0x18c5a0['as'],'attributes':_0x18c5a0[_0x64a9('0x21')],'include':_0x18c5a0[_0x64a9('0x22')]?_[_0x64a9('0x1f')](_0x18c5a0[_0x64a9('0x22')],function(_0x5e1399){return{'model':db[_0x5e1399[_0x64a9('0x20')]],'as':_0x5e1399['as'],'attributes':_0x5e1399[_0x64a9('0x21')],'include':_0x5e1399[_0x64a9('0x22')]?_['map'](_0x5e1399[_0x64a9('0x22')],function(_0x484ecd){return{'model':db[_0x484ecd[_0x64a9('0x20')]],'as':_0x484ecd['as'],'attributes':_0x484ecd[_0x64a9('0x21')]};}):[]};}):[]};}):[]:[]})[_0x64a9('0xf')](function(_0x5ecf17){logger['info']('ShowOpenchannelQueue',_0x49fd9f);logger[_0x64a9('0x12')](_0x64a9('0x24'),_0x49fd9f,JSON['stringify'](_0x5ecf17));_0x567a76(_0x5ecf17);})[_0x64a9('0x19')](function(_0x206db2){logger[_0x64a9('0x15')](_0x64a9('0x24'),_0x206db2[_0x64a9('0x17')],_0x49fd9f);_0x5d1fbc(_0x4f32ef[_0x64a9('0x15')](0x1f4,_0x206db2[_0x64a9('0x17')]));});});};
\ No newline at end of file
+var _0xe124=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','OpenchannelQueue,\x20%s,\x20%s','message','result','GetOpenchannelQueue','OpenchannelQueue','options','raw','where','attributes','limit','include','map','model','stringify','catch','ShowOpenchannelQueue','util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x286f20,_0x519022){var _0x50c51a=function(_0x17f6bd){while(--_0x17f6bd){_0x286f20['push'](_0x286f20['shift']());}};_0x50c51a(++_0x519022);}(_0xe124,0x180));var _0x4e12=function(_0x2f7dc2,_0x30913e){_0x2f7dc2=_0x2f7dc2-0x0;var _0x37b749=_0xe124[_0x2f7dc2];return _0x37b749;};'use strict';var _=require('lodash');var util=require(_0x4e12('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4e12('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4e12('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x4e12('0x3'))(_0x4e12('0x4'));var config=require(_0x4e12('0x5'));var jayson=require(_0x4e12('0x6'));var client=jayson[_0x4e12('0x7')][_0x4e12('0x8')]({'port':0x232a});config[_0x4e12('0x9')]=_[_0x4e12('0xa')](config['redis'],{'host':_0x4e12('0xb'),'port':0x18eb});var socket=require(_0x4e12('0xc'))(new Redis(config[_0x4e12('0x9')]));require(_0x4e12('0xd'))[_0x4e12('0xe')](socket);function respondWithRpcPromise(_0x1f35a9,_0x103e78,_0x21f38a){return new BPromise(function(_0x1cb0c4,_0x581fb2){return client[_0x4e12('0xf')](_0x1f35a9,_0x21f38a)[_0x4e12('0x10')](function(_0x17c208){logger[_0x4e12('0x11')]('OpenchannelQueue,\x20%s,\x20%s',_0x103e78,_0x4e12('0x12'));logger[_0x4e12('0x13')](_0x4e12('0x14'),_0x103e78,'request\x20sent',JSON['stringify'](_0x17c208));if(_0x17c208['error']){if(_0x17c208[_0x4e12('0x15')][_0x4e12('0x16')]===0x1f4){logger[_0x4e12('0x15')](_0x4e12('0x17'),_0x103e78,_0x17c208[_0x4e12('0x15')]['message']);return _0x581fb2(_0x17c208[_0x4e12('0x15')][_0x4e12('0x18')]);}logger[_0x4e12('0x15')](_0x4e12('0x17'),_0x103e78,_0x17c208['error']['message']);return _0x1cb0c4(_0x17c208[_0x4e12('0x15')][_0x4e12('0x18')]);}else{logger[_0x4e12('0x11')](_0x4e12('0x17'),_0x103e78,_0x4e12('0x12'));_0x1cb0c4(_0x17c208[_0x4e12('0x19')][_0x4e12('0x18')]);}})['catch'](function(_0x82fe78){logger['error'](_0x4e12('0x17'),_0x103e78,_0x82fe78);_0x581fb2(_0x82fe78);});});}exports[_0x4e12('0x1a')]=function(_0x5c5563){var _0x222ce9=this;return new Promise(function(_0x3f54ee,_0x22b126){return db[_0x4e12('0x1b')]['findAll']({'raw':_0x5c5563[_0x4e12('0x1c')]?_0x5c5563['options'][_0x4e12('0x1d')]===undefined?!![]:![]:!![],'where':_0x5c5563[_0x4e12('0x1c')]?_0x5c5563[_0x4e12('0x1c')][_0x4e12('0x1e')]||null:null,'attributes':_0x5c5563[_0x4e12('0x1c')]?_0x5c5563[_0x4e12('0x1c')][_0x4e12('0x1f')]||null:null,'limit':_0x5c5563[_0x4e12('0x1c')]?_0x5c5563['options'][_0x4e12('0x20')]||null:null,'include':_0x5c5563[_0x4e12('0x1c')]?_0x5c5563[_0x4e12('0x1c')][_0x4e12('0x21')]?_[_0x4e12('0x22')](_0x5c5563[_0x4e12('0x1c')][_0x4e12('0x21')],function(_0x5eada8){return{'model':db[_0x5eada8[_0x4e12('0x23')]],'as':_0x5eada8['as'],'attributes':_0x5eada8[_0x4e12('0x1f')],'include':_0x5eada8[_0x4e12('0x21')]?_[_0x4e12('0x22')](_0x5eada8[_0x4e12('0x21')],function(_0x1392d6){return{'model':db[_0x1392d6[_0x4e12('0x23')]],'as':_0x1392d6['as'],'attributes':_0x1392d6[_0x4e12('0x1f')],'include':_0x1392d6[_0x4e12('0x21')]?_['map'](_0x1392d6[_0x4e12('0x21')],function(_0x3fdffa){return{'model':db[_0x3fdffa[_0x4e12('0x23')]],'as':_0x3fdffa['as'],'attributes':_0x3fdffa['attributes']};}):[]};}):[]};}):[]:[]})[_0x4e12('0x10')](function(_0x46dfda){logger[_0x4e12('0x11')](_0x4e12('0x1a'),_0x5c5563);logger['debug'](_0x4e12('0x1a'),_0x5c5563,JSON[_0x4e12('0x24')](_0x46dfda));_0x3f54ee(_0x46dfda);})[_0x4e12('0x25')](function(_0x43d2ee){logger[_0x4e12('0x15')]('GetOpenchannelQueue',_0x43d2ee[_0x4e12('0x18')],_0x5c5563);_0x22b126(_0x222ce9[_0x4e12('0x15')](0x1f4,_0x43d2ee[_0x4e12('0x18')]));});});};exports[_0x4e12('0x26')]=function(_0x5b3b78){var _0x34c6db=this;return new Promise(function(_0x30412f,_0x39a8df){return db['OpenchannelQueue']['find']({'raw':_0x5b3b78[_0x4e12('0x1c')]?_0x5b3b78['options'][_0x4e12('0x1d')]===undefined?!![]:![]:!![],'where':_0x5b3b78[_0x4e12('0x1c')]?_0x5b3b78[_0x4e12('0x1c')][_0x4e12('0x1e')]||null:null,'attributes':_0x5b3b78['options']?_0x5b3b78[_0x4e12('0x1c')][_0x4e12('0x1f')]||null:null,'include':_0x5b3b78[_0x4e12('0x1c')]?_0x5b3b78[_0x4e12('0x1c')][_0x4e12('0x21')]?_[_0x4e12('0x22')](_0x5b3b78[_0x4e12('0x1c')][_0x4e12('0x21')],function(_0x2cf017){return{'model':db[_0x2cf017['model']],'as':_0x2cf017['as'],'attributes':_0x2cf017['attributes'],'include':_0x2cf017[_0x4e12('0x21')]?_['map'](_0x2cf017[_0x4e12('0x21')],function(_0x41dead){return{'model':db[_0x41dead[_0x4e12('0x23')]],'as':_0x41dead['as'],'attributes':_0x41dead['attributes'],'include':_0x41dead[_0x4e12('0x21')]?_[_0x4e12('0x22')](_0x41dead[_0x4e12('0x21')],function(_0x1ad7cb){return{'model':db[_0x1ad7cb['model']],'as':_0x1ad7cb['as'],'attributes':_0x1ad7cb[_0x4e12('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xe81d74){logger[_0x4e12('0x11')](_0x4e12('0x26'),_0x5b3b78);logger[_0x4e12('0x13')](_0x4e12('0x26'),_0x5b3b78,JSON[_0x4e12('0x24')](_0xe81d74));_0x30412f(_0xe81d74);})[_0x4e12('0x25')](function(_0x4f2c90){logger[_0x4e12('0x15')](_0x4e12('0x26'),_0x4f2c90[_0x4e12('0x18')],_0x5b3b78);_0x39a8df(_0x34c6db['error'](0x1f4,_0x4f2c90[_0x4e12('0x18')]));});});};
\ No newline at end of file