Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 29289b6..b61897d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe385=['debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','GetOpenchannelQueue','findAll','options','raw','where','attributes','include','map','model','ShowOpenchannelQueue','find','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','request','then','info','OpenchannelQueue,\x20%s,\x20%s'];(function(_0x1bd410,_0x3f5f6f){var _0x5b3cb1=function(_0x2a5879){while(--_0x2a5879){_0x1bd410['push'](_0x1bd410['shift']());}};_0x5b3cb1(++_0x3f5f6f);}(_0xe385,0x7f));var _0x5e38=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xe385[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0x5e38('0x0'));var util=require('util');var moment=require(_0x5e38('0x1'));var BPromise=require(_0x5e38('0x2'));var rs=require(_0x5e38('0x3'));var fs=require('fs');var Redis=require(_0x5e38('0x4'));var db=require(_0x5e38('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x5e38('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x5e38('0x7')]({'port':0x232a});config[_0x5e38('0x8')]=_[_0x5e38('0x9')](config[_0x5e38('0x8')],{'host':_0x5e38('0xa'),'port':0x18eb});var socket=require(_0x5e38('0xb'))(new Redis(config[_0x5e38('0x8')]));require(_0x5e38('0xc'))['register'](socket);function respondWithRpcPromise(_0x2a1faf,_0x35f144,_0x3f8ae2){return new BPromise(function(_0x2b01c6,_0xcb3f2d){return client[_0x5e38('0xd')](_0x2a1faf,_0x3f8ae2)[_0x5e38('0xe')](function(_0x41e931){logger[_0x5e38('0xf')](_0x5e38('0x10'),_0x35f144,'request\x20sent');logger[_0x5e38('0x11')](_0x5e38('0x12'),_0x35f144,'request\x20sent',JSON[_0x5e38('0x13')](_0x41e931));if(_0x41e931[_0x5e38('0x14')]){if(_0x41e931['error']['code']===0x1f4){logger[_0x5e38('0x14')](_0x5e38('0x10'),_0x35f144,_0x41e931[_0x5e38('0x14')][_0x5e38('0x15')]);return _0xcb3f2d(_0x41e931[_0x5e38('0x14')][_0x5e38('0x15')]);}logger[_0x5e38('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x35f144,_0x41e931[_0x5e38('0x14')][_0x5e38('0x15')]);return _0x2b01c6(_0x41e931['error']['message']);}else{logger[_0x5e38('0xf')](_0x5e38('0x10'),_0x35f144,_0x5e38('0x16'));_0x2b01c6(_0x41e931[_0x5e38('0x17')]['message']);}})[_0x5e38('0x18')](function(_0x45873a){logger[_0x5e38('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x35f144,_0x45873a);_0xcb3f2d(_0x45873a);});});}exports[_0x5e38('0x19')]=function(_0x5a90ab){var _0x5cfb7a=this;return new Promise(function(_0x2be9ca,_0x3de042){return db['OpenchannelQueue'][_0x5e38('0x1a')]({'raw':_0x5a90ab[_0x5e38('0x1b')]?_0x5a90ab[_0x5e38('0x1b')][_0x5e38('0x1c')]===undefined?!![]:![]:!![],'where':_0x5a90ab[_0x5e38('0x1b')]?_0x5a90ab[_0x5e38('0x1b')][_0x5e38('0x1d')]||null:null,'attributes':_0x5a90ab[_0x5e38('0x1b')]?_0x5a90ab[_0x5e38('0x1b')][_0x5e38('0x1e')]||null:null,'limit':_0x5a90ab['options']?_0x5a90ab[_0x5e38('0x1b')]['limit']||null:null,'include':_0x5a90ab[_0x5e38('0x1b')]?_0x5a90ab[_0x5e38('0x1b')][_0x5e38('0x1f')]?_[_0x5e38('0x20')](_0x5a90ab['options'][_0x5e38('0x1f')],function(_0x388a35){return{'model':db[_0x388a35[_0x5e38('0x21')]],'as':_0x388a35['as'],'attributes':_0x388a35[_0x5e38('0x1e')],'include':_0x388a35[_0x5e38('0x1f')]?_[_0x5e38('0x20')](_0x388a35[_0x5e38('0x1f')],function(_0x5acdb9){return{'model':db[_0x5acdb9[_0x5e38('0x21')]],'as':_0x5acdb9['as'],'attributes':_0x5acdb9['attributes'],'include':_0x5acdb9['include']?_['map'](_0x5acdb9[_0x5e38('0x1f')],function(_0x3d5e32){return{'model':db[_0x3d5e32[_0x5e38('0x21')]],'as':_0x3d5e32['as'],'attributes':_0x3d5e32[_0x5e38('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x5e38('0xe')](function(_0x4c8584){logger[_0x5e38('0xf')](_0x5e38('0x19'),_0x5a90ab);logger[_0x5e38('0x11')](_0x5e38('0x19'),_0x5a90ab,JSON[_0x5e38('0x13')](_0x4c8584));_0x2be9ca(_0x4c8584);})[_0x5e38('0x18')](function(_0x30ea9c){logger[_0x5e38('0x14')]('GetOpenchannelQueue',_0x30ea9c[_0x5e38('0x15')],_0x5a90ab);_0x3de042(_0x5cfb7a[_0x5e38('0x14')](0x1f4,_0x30ea9c['message']));});});};exports[_0x5e38('0x22')]=function(_0x525065){var _0x4a7fb9=this;return new Promise(function(_0x2131b9,_0x23d783){return db['OpenchannelQueue'][_0x5e38('0x23')]({'raw':_0x525065[_0x5e38('0x1b')]?_0x525065[_0x5e38('0x1b')][_0x5e38('0x1c')]===undefined?!![]:![]:!![],'where':_0x525065[_0x5e38('0x1b')]?_0x525065['options']['where']||null:null,'attributes':_0x525065[_0x5e38('0x1b')]?_0x525065[_0x5e38('0x1b')]['attributes']||null:null,'include':_0x525065[_0x5e38('0x1b')]?_0x525065[_0x5e38('0x1b')][_0x5e38('0x1f')]?_['map'](_0x525065['options']['include'],function(_0x276cf0){return{'model':db[_0x276cf0[_0x5e38('0x21')]],'as':_0x276cf0['as'],'attributes':_0x276cf0[_0x5e38('0x1e')],'include':_0x276cf0[_0x5e38('0x1f')]?_['map'](_0x276cf0['include'],function(_0x28df6c){return{'model':db[_0x28df6c[_0x5e38('0x21')]],'as':_0x28df6c['as'],'attributes':_0x28df6c[_0x5e38('0x1e')],'include':_0x28df6c[_0x5e38('0x1f')]?_['map'](_0x28df6c[_0x5e38('0x1f')],function(_0x3d7cbe){return{'model':db[_0x3d7cbe[_0x5e38('0x21')]],'as':_0x3d7cbe['as'],'attributes':_0x3d7cbe[_0x5e38('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x5e38('0xe')](function(_0x3070c4){logger[_0x5e38('0xf')](_0x5e38('0x22'),_0x525065);logger[_0x5e38('0x11')](_0x5e38('0x22'),_0x525065,JSON[_0x5e38('0x13')](_0x3070c4));_0x2131b9(_0x3070c4);})[_0x5e38('0x18')](function(_0x55cf70){logger[_0x5e38('0x14')](_0x5e38('0x22'),_0x55cf70[_0x5e38('0x15')],_0x525065);_0x23d783(_0x4a7fb9[_0x5e38('0x14')](0x1f4,_0x55cf70[_0x5e38('0x15')]));});});};
\ No newline at end of file
+var _0xe164=['socket.io-emitter','./openchannelQueue.socket','register','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','OpenchannelQueue,\x20%s,\x20%s','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','attributes','limit','include','map','model','stringify','ShowOpenchannelQueue','find','where','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','client','http','defaults','redis'];(function(_0x32aea7,_0x482ca0){var _0x207a10=function(_0x23ce65){while(--_0x23ce65){_0x32aea7['push'](_0x32aea7['shift']());}};_0x207a10(++_0x482ca0);}(_0xe164,0x1a2));var _0x4e16=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xe164[_0x413feb];return _0x40ee88;};'use strict';var _=require(_0x4e16('0x0'));var util=require('util');var moment=require(_0x4e16('0x1'));var BPromise=require(_0x4e16('0x2'));var rs=require(_0x4e16('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4e16('0x4'))['db'];var utils=require(_0x4e16('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x4e16('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x4e16('0x7')][_0x4e16('0x8')]({'port':0x232a});config['redis']=_[_0x4e16('0x9')](config[_0x4e16('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x4e16('0xb'))(new Redis(config[_0x4e16('0xa')]));require(_0x4e16('0xc'))[_0x4e16('0xd')](socket);function respondWithRpcPromise(_0xe2eb3,_0x410bff,_0x51c0d7){return new BPromise(function(_0x3dedb5,_0xa1c347){return client[_0x4e16('0xe')](_0xe2eb3,_0x51c0d7)[_0x4e16('0xf')](function(_0x18752a){logger[_0x4e16('0x10')]('OpenchannelQueue,\x20%s,\x20%s',_0x410bff,_0x4e16('0x11'));logger[_0x4e16('0x12')](_0x4e16('0x13'),_0x410bff,_0x4e16('0x11'),JSON['stringify'](_0x18752a));if(_0x18752a[_0x4e16('0x14')]){if(_0x18752a['error']['code']===0x1f4){logger[_0x4e16('0x14')](_0x4e16('0x15'),_0x410bff,_0x18752a['error'][_0x4e16('0x16')]);return _0xa1c347(_0x18752a['error']['message']);}logger[_0x4e16('0x14')](_0x4e16('0x15'),_0x410bff,_0x18752a[_0x4e16('0x14')][_0x4e16('0x16')]);return _0x3dedb5(_0x18752a['error']['message']);}else{logger[_0x4e16('0x10')]('OpenchannelQueue,\x20%s,\x20%s',_0x410bff,_0x4e16('0x11'));_0x3dedb5(_0x18752a[_0x4e16('0x17')]['message']);}})[_0x4e16('0x18')](function(_0xb26044){logger[_0x4e16('0x14')](_0x4e16('0x15'),_0x410bff,_0xb26044);_0xa1c347(_0xb26044);});});}exports[_0x4e16('0x19')]=function(_0x5c43b0){var _0x1f8a28=this;return new Promise(function(_0x1d830e,_0x4f8444){return db[_0x4e16('0x1a')][_0x4e16('0x1b')]({'raw':_0x5c43b0['options']?_0x5c43b0[_0x4e16('0x1c')][_0x4e16('0x1d')]===undefined?!![]:![]:!![],'where':_0x5c43b0[_0x4e16('0x1c')]?_0x5c43b0['options']['where']||null:null,'attributes':_0x5c43b0[_0x4e16('0x1c')]?_0x5c43b0[_0x4e16('0x1c')][_0x4e16('0x1e')]||null:null,'limit':_0x5c43b0[_0x4e16('0x1c')]?_0x5c43b0[_0x4e16('0x1c')][_0x4e16('0x1f')]||null:null,'include':_0x5c43b0[_0x4e16('0x1c')]?_0x5c43b0['options'][_0x4e16('0x20')]?_[_0x4e16('0x21')](_0x5c43b0[_0x4e16('0x1c')][_0x4e16('0x20')],function(_0x18665a){return{'model':db[_0x18665a[_0x4e16('0x22')]],'as':_0x18665a['as'],'attributes':_0x18665a[_0x4e16('0x1e')],'include':_0x18665a[_0x4e16('0x20')]?_[_0x4e16('0x21')](_0x18665a['include'],function(_0x4cfcf2){return{'model':db[_0x4cfcf2[_0x4e16('0x22')]],'as':_0x4cfcf2['as'],'attributes':_0x4cfcf2[_0x4e16('0x1e')],'include':_0x4cfcf2['include']?_[_0x4e16('0x21')](_0x4cfcf2[_0x4e16('0x20')],function(_0x16325d){return{'model':db[_0x16325d[_0x4e16('0x22')]],'as':_0x16325d['as'],'attributes':_0x16325d['attributes']};}):[]};}):[]};}):[]:[]})[_0x4e16('0xf')](function(_0x28d970){logger[_0x4e16('0x10')](_0x4e16('0x19'),_0x5c43b0);logger['debug'](_0x4e16('0x19'),_0x5c43b0,JSON[_0x4e16('0x23')](_0x28d970));_0x1d830e(_0x28d970);})[_0x4e16('0x18')](function(_0x36ef54){logger[_0x4e16('0x14')](_0x4e16('0x19'),_0x36ef54[_0x4e16('0x16')],_0x5c43b0);_0x4f8444(_0x1f8a28[_0x4e16('0x14')](0x1f4,_0x36ef54['message']));});});};exports[_0x4e16('0x24')]=function(_0x5b8940){var _0x540041=this;return new Promise(function(_0x4747b5,_0x34d7f2){return db[_0x4e16('0x1a')][_0x4e16('0x25')]({'raw':_0x5b8940[_0x4e16('0x1c')]?_0x5b8940[_0x4e16('0x1c')][_0x4e16('0x1d')]===undefined?!![]:![]:!![],'where':_0x5b8940[_0x4e16('0x1c')]?_0x5b8940[_0x4e16('0x1c')][_0x4e16('0x26')]||null:null,'attributes':_0x5b8940[_0x4e16('0x1c')]?_0x5b8940[_0x4e16('0x1c')][_0x4e16('0x1e')]||null:null,'include':_0x5b8940['options']?_0x5b8940[_0x4e16('0x1c')][_0x4e16('0x20')]?_[_0x4e16('0x21')](_0x5b8940[_0x4e16('0x1c')][_0x4e16('0x20')],function(_0x29174b){return{'model':db[_0x29174b[_0x4e16('0x22')]],'as':_0x29174b['as'],'attributes':_0x29174b['attributes'],'include':_0x29174b[_0x4e16('0x20')]?_[_0x4e16('0x21')](_0x29174b[_0x4e16('0x20')],function(_0x91ea62){return{'model':db[_0x91ea62[_0x4e16('0x22')]],'as':_0x91ea62['as'],'attributes':_0x91ea62[_0x4e16('0x1e')],'include':_0x91ea62[_0x4e16('0x20')]?_[_0x4e16('0x21')](_0x91ea62[_0x4e16('0x20')],function(_0x4fc35e){return{'model':db[_0x4fc35e[_0x4e16('0x22')]],'as':_0x4fc35e['as'],'attributes':_0x4fc35e[_0x4e16('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x4e16('0xf')](function(_0x2c6e1b){logger[_0x4e16('0x10')]('ShowOpenchannelQueue',_0x5b8940);logger[_0x4e16('0x12')](_0x4e16('0x24'),_0x5b8940,JSON[_0x4e16('0x23')](_0x2c6e1b));_0x4747b5(_0x2c6e1b);})['catch'](function(_0x3e16a0){logger[_0x4e16('0x14')]('ShowOpenchannelQueue',_0x3e16a0[_0x4e16('0x16')],_0x5b8940);_0x34d7f2(_0x540041[_0x4e16('0x14')](0x1f4,_0x3e16a0['message']));});});};
\ No newline at end of file