Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index e5d49af..54a9e1d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1034=['defaults','localhost','socket.io-emitter','register','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetOpenchannelQueue','findAll','options','raw','where','attributes','limit','include','map','model','stringify','ShowOpenchannelQueue','OpenchannelQueue','find','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x2da357,_0x1f9b2f){var _0x138fdd=function(_0xe3077d){while(--_0xe3077d){_0x2da357['push'](_0x2da357['shift']());}};_0x138fdd(++_0x1f9b2f);}(_0x1034,0x17c));var _0x4103=function(_0x54354a,_0x2e6087){_0x54354a=_0x54354a-0x0;var _0x55e700=_0x1034[_0x54354a];return _0x55e700;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4103('0x0'));var fs=require('fs');var Redis=require(_0x4103('0x1'));var db=require(_0x4103('0x2'))['db'];var utils=require(_0x4103('0x3'));var logger=require('../../config/logger')(_0x4103('0x4'));var config=require(_0x4103('0x5'));var jayson=require(_0x4103('0x6'));var client=jayson[_0x4103('0x7')][_0x4103('0x8')]({'port':0x232a});config[_0x4103('0x9')]=_[_0x4103('0xa')](config[_0x4103('0x9')],{'host':_0x4103('0xb'),'port':0x18eb});var socket=require(_0x4103('0xc'))(new Redis(config[_0x4103('0x9')]));require('./openchannelQueue.socket')[_0x4103('0xd')](socket);function respondWithRpcPromise(_0x5d780e,_0x20f7b4,_0xd42dc7){return new BPromise(function(_0x42024e,_0x46a654){return client['request'](_0x5d780e,_0xd42dc7)[_0x4103('0xe')](function(_0x459c8e){logger[_0x4103('0xf')](_0x4103('0x10'),_0x20f7b4,_0x4103('0x11'));logger[_0x4103('0x12')](_0x4103('0x13'),_0x20f7b4,_0x4103('0x11'),JSON['stringify'](_0x459c8e));if(_0x459c8e[_0x4103('0x14')]){if(_0x459c8e[_0x4103('0x14')][_0x4103('0x15')]===0x1f4){logger[_0x4103('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x20f7b4,_0x459c8e[_0x4103('0x14')][_0x4103('0x16')]);return _0x46a654(_0x459c8e[_0x4103('0x14')][_0x4103('0x16')]);}logger[_0x4103('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x20f7b4,_0x459c8e[_0x4103('0x14')][_0x4103('0x16')]);return _0x42024e(_0x459c8e['error'][_0x4103('0x16')]);}else{logger[_0x4103('0xf')](_0x4103('0x10'),_0x20f7b4,_0x4103('0x11'));_0x42024e(_0x459c8e[_0x4103('0x17')][_0x4103('0x16')]);}})[_0x4103('0x18')](function(_0x452556){logger[_0x4103('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x20f7b4,_0x452556);_0x46a654(_0x452556);});});}exports[_0x4103('0x19')]=function(_0x46322a){var _0x2d5a66=this;return new Promise(function(_0x1b95c0,_0x388d0a){return db['OpenchannelQueue'][_0x4103('0x1a')]({'raw':_0x46322a[_0x4103('0x1b')]?_0x46322a[_0x4103('0x1b')][_0x4103('0x1c')]===undefined?!![]:![]:!![],'where':_0x46322a[_0x4103('0x1b')]?_0x46322a[_0x4103('0x1b')][_0x4103('0x1d')]||null:null,'attributes':_0x46322a[_0x4103('0x1b')]?_0x46322a['options'][_0x4103('0x1e')]||null:null,'limit':_0x46322a[_0x4103('0x1b')]?_0x46322a['options'][_0x4103('0x1f')]||null:null,'include':_0x46322a['options']?_0x46322a[_0x4103('0x1b')][_0x4103('0x20')]?_[_0x4103('0x21')](_0x46322a[_0x4103('0x1b')][_0x4103('0x20')],function(_0x45b990){return{'model':db[_0x45b990['model']],'as':_0x45b990['as'],'attributes':_0x45b990['attributes'],'include':_0x45b990[_0x4103('0x20')]?_['map'](_0x45b990['include'],function(_0x32afaa){return{'model':db[_0x32afaa[_0x4103('0x22')]],'as':_0x32afaa['as'],'attributes':_0x32afaa[_0x4103('0x1e')],'include':_0x32afaa[_0x4103('0x20')]?_['map'](_0x32afaa[_0x4103('0x20')],function(_0xc86c61){return{'model':db[_0xc86c61[_0x4103('0x22')]],'as':_0xc86c61['as'],'attributes':_0xc86c61[_0x4103('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x562900){logger[_0x4103('0xf')](_0x4103('0x19'),_0x46322a);logger[_0x4103('0x12')](_0x4103('0x19'),_0x46322a,JSON[_0x4103('0x23')](_0x562900));_0x1b95c0(_0x562900);})[_0x4103('0x18')](function(_0x1200f9){logger['error'](_0x4103('0x19'),_0x1200f9[_0x4103('0x16')],_0x46322a);_0x388d0a(_0x2d5a66['error'](0x1f4,_0x1200f9['message']));});});};exports[_0x4103('0x24')]=function(_0x7c1f4e){var _0x2b1560=this;return new Promise(function(_0x1898de,_0x3fbf61){return db[_0x4103('0x25')][_0x4103('0x26')]({'raw':_0x7c1f4e[_0x4103('0x1b')]?_0x7c1f4e[_0x4103('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x7c1f4e['options']?_0x7c1f4e['options'][_0x4103('0x1d')]||null:null,'attributes':_0x7c1f4e[_0x4103('0x1b')]?_0x7c1f4e[_0x4103('0x1b')][_0x4103('0x1e')]||null:null,'include':_0x7c1f4e[_0x4103('0x1b')]?_0x7c1f4e[_0x4103('0x1b')][_0x4103('0x20')]?_['map'](_0x7c1f4e[_0x4103('0x1b')]['include'],function(_0x2357c9){return{'model':db[_0x2357c9[_0x4103('0x22')]],'as':_0x2357c9['as'],'attributes':_0x2357c9[_0x4103('0x1e')],'include':_0x2357c9[_0x4103('0x20')]?_['map'](_0x2357c9[_0x4103('0x20')],function(_0x7315d2){return{'model':db[_0x7315d2[_0x4103('0x22')]],'as':_0x7315d2['as'],'attributes':_0x7315d2[_0x4103('0x1e')],'include':_0x7315d2[_0x4103('0x20')]?_[_0x4103('0x21')](_0x7315d2[_0x4103('0x20')],function(_0x37d836){return{'model':db[_0x37d836[_0x4103('0x22')]],'as':_0x37d836['as'],'attributes':_0x37d836[_0x4103('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x4103('0xe')](function(_0x4844c3){logger['info'](_0x4103('0x24'),_0x7c1f4e);logger[_0x4103('0x12')]('ShowOpenchannelQueue',_0x7c1f4e,JSON[_0x4103('0x23')](_0x4844c3));_0x1898de(_0x4844c3);})[_0x4103('0x18')](function(_0x140442){logger[_0x4103('0x14')](_0x4103('0x24'),_0x140442[_0x4103('0x16')],_0x7c1f4e);_0x3fbf61(_0x2b1560[_0x4103('0x14')](0x1f4,_0x140442[_0x4103('0x16')]));});});};
\ No newline at end of file
+var _0x6343=['findAll','options','raw','where','attributes','limit','include','map','model','debug','stringify','ShowOpenchannelQueue','find','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','GetOpenchannelQueue'];(function(_0x528342,_0x17a981){var _0x27dd91=function(_0x20bed6){while(--_0x20bed6){_0x528342['push'](_0x528342['shift']());}};_0x27dd91(++_0x17a981);}(_0x6343,0x1c5));var _0x3634=function(_0x584650,_0x57139e){_0x584650=_0x584650-0x0;var _0x5125a8=_0x6343[_0x584650];return _0x5125a8;};'use strict';var _=require(_0x3634('0x0'));var util=require('util');var moment=require(_0x3634('0x1'));var BPromise=require('bluebird');var rs=require(_0x3634('0x2'));var fs=require('fs');var Redis=require(_0x3634('0x3'));var db=require(_0x3634('0x4'))['db'];var utils=require(_0x3634('0x5'));var logger=require('../../config/logger')(_0x3634('0x6'));var config=require(_0x3634('0x7'));var jayson=require(_0x3634('0x8'));var client=jayson[_0x3634('0x9')]['http']({'port':0x232a});config[_0x3634('0xa')]=_[_0x3634('0xb')](config[_0x3634('0xa')],{'host':_0x3634('0xc'),'port':0x18eb});var socket=require(_0x3634('0xd'))(new Redis(config[_0x3634('0xa')]));require('./openchannelQueue.socket')[_0x3634('0xe')](socket);function respondWithRpcPromise(_0x792432,_0x3f3409,_0x5998f8){return new BPromise(function(_0x4684c2,_0xaa330c){return client[_0x3634('0xf')](_0x792432,_0x5998f8)[_0x3634('0x10')](function(_0x349cac){logger['info'](_0x3634('0x11'),_0x3f3409,_0x3634('0x12'));logger['debug'](_0x3634('0x13'),_0x3f3409,_0x3634('0x12'),JSON['stringify'](_0x349cac));if(_0x349cac[_0x3634('0x14')]){if(_0x349cac[_0x3634('0x14')][_0x3634('0x15')]===0x1f4){logger['error'](_0x3634('0x11'),_0x3f3409,_0x349cac[_0x3634('0x14')][_0x3634('0x16')]);return _0xaa330c(_0x349cac[_0x3634('0x14')][_0x3634('0x16')]);}logger[_0x3634('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x3f3409,_0x349cac[_0x3634('0x14')][_0x3634('0x16')]);return _0x4684c2(_0x349cac[_0x3634('0x14')][_0x3634('0x16')]);}else{logger[_0x3634('0x17')](_0x3634('0x11'),_0x3f3409,'request\x20sent');_0x4684c2(_0x349cac[_0x3634('0x18')]['message']);}})[_0x3634('0x19')](function(_0x3934ba){logger[_0x3634('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x3f3409,_0x3934ba);_0xaa330c(_0x3934ba);});});}exports[_0x3634('0x1a')]=function(_0x5073d2){var _0x2a8035=this;return new Promise(function(_0x425e28,_0x5cd237){return db['OpenchannelQueue'][_0x3634('0x1b')]({'raw':_0x5073d2['options']?_0x5073d2[_0x3634('0x1c')][_0x3634('0x1d')]===undefined?!![]:![]:!![],'where':_0x5073d2[_0x3634('0x1c')]?_0x5073d2[_0x3634('0x1c')][_0x3634('0x1e')]||null:null,'attributes':_0x5073d2['options']?_0x5073d2['options'][_0x3634('0x1f')]||null:null,'limit':_0x5073d2[_0x3634('0x1c')]?_0x5073d2['options'][_0x3634('0x20')]||null:null,'include':_0x5073d2[_0x3634('0x1c')]?_0x5073d2[_0x3634('0x1c')][_0x3634('0x21')]?_[_0x3634('0x22')](_0x5073d2[_0x3634('0x1c')]['include'],function(_0x2a7c59){return{'model':db[_0x2a7c59[_0x3634('0x23')]],'as':_0x2a7c59['as'],'attributes':_0x2a7c59[_0x3634('0x1f')],'include':_0x2a7c59['include']?_[_0x3634('0x22')](_0x2a7c59[_0x3634('0x21')],function(_0x877643){return{'model':db[_0x877643[_0x3634('0x23')]],'as':_0x877643['as'],'attributes':_0x877643[_0x3634('0x1f')],'include':_0x877643[_0x3634('0x21')]?_[_0x3634('0x22')](_0x877643[_0x3634('0x21')],function(_0xb8ac65){return{'model':db[_0xb8ac65[_0x3634('0x23')]],'as':_0xb8ac65['as'],'attributes':_0xb8ac65[_0x3634('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x3634('0x10')](function(_0x4d31a8){logger['info'](_0x3634('0x1a'),_0x5073d2);logger[_0x3634('0x24')]('GetOpenchannelQueue',_0x5073d2,JSON[_0x3634('0x25')](_0x4d31a8));_0x425e28(_0x4d31a8);})['catch'](function(_0x163a05){logger[_0x3634('0x14')](_0x3634('0x1a'),_0x163a05['message'],_0x5073d2);_0x5cd237(_0x2a8035['error'](0x1f4,_0x163a05['message']));});});};exports[_0x3634('0x26')]=function(_0x541c9e){var _0x4e24dd=this;return new Promise(function(_0x5409e1,_0x475af7){return db['OpenchannelQueue'][_0x3634('0x27')]({'raw':_0x541c9e[_0x3634('0x1c')]?_0x541c9e['options'][_0x3634('0x1d')]===undefined?!![]:![]:!![],'where':_0x541c9e[_0x3634('0x1c')]?_0x541c9e['options'][_0x3634('0x1e')]||null:null,'attributes':_0x541c9e['options']?_0x541c9e[_0x3634('0x1c')][_0x3634('0x1f')]||null:null,'include':_0x541c9e['options']?_0x541c9e[_0x3634('0x1c')][_0x3634('0x21')]?_[_0x3634('0x22')](_0x541c9e[_0x3634('0x1c')]['include'],function(_0x2d29e8){return{'model':db[_0x2d29e8['model']],'as':_0x2d29e8['as'],'attributes':_0x2d29e8[_0x3634('0x1f')],'include':_0x2d29e8[_0x3634('0x21')]?_['map'](_0x2d29e8[_0x3634('0x21')],function(_0x632a11){return{'model':db[_0x632a11['model']],'as':_0x632a11['as'],'attributes':_0x632a11[_0x3634('0x1f')],'include':_0x632a11['include']?_['map'](_0x632a11[_0x3634('0x21')],function(_0x2378ed){return{'model':db[_0x2378ed[_0x3634('0x23')]],'as':_0x2378ed['as'],'attributes':_0x2378ed[_0x3634('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x570625){logger[_0x3634('0x17')](_0x3634('0x26'),_0x541c9e);logger[_0x3634('0x24')](_0x3634('0x26'),_0x541c9e,JSON['stringify'](_0x570625));_0x5409e1(_0x570625);})[_0x3634('0x19')](function(_0x512bba){logger[_0x3634('0x14')](_0x3634('0x26'),_0x512bba[_0x3634('0x16')],_0x541c9e);_0x475af7(_0x4e24dd[_0x3634('0x14')](0x1f4,_0x512bba[_0x3634('0x16')]));});});};
\ No newline at end of file