Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / interval / interval.rpc.js
index bc25a04..1163b4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc978=['info','result','catch','GetInterval','Interval','findAll','options','raw','where','attributes','limit','map','include','model','ShowInterval','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x23e23d,_0x7ab621){var _0x502d=function(_0x6265cf){while(--_0x6265cf){_0x23e23d['push'](_0x23e23d['shift']());}};_0x502d(++_0x7ab621);}(_0xc978,0xcd));var _0x8c97=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc978[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8c97('0x0'));var util=require(_0x8c97('0x1'));var moment=require(_0x8c97('0x2'));var BPromise=require(_0x8c97('0x3'));var rs=require(_0x8c97('0x4'));var fs=require('fs');var Redis=require(_0x8c97('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8c97('0x6'));var logger=require(_0x8c97('0x7'))(_0x8c97('0x8'));var config=require(_0x8c97('0x9'));var jayson=require(_0x8c97('0xa'));var client=jayson[_0x8c97('0xb')][_0x8c97('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x524196,_0x41a511,_0x1b5864){return new BPromise(function(_0x332cd1,_0x26ff40){return client[_0x8c97('0xd')](_0x524196,_0x1b5864)[_0x8c97('0xe')](function(_0x17aef0){logger['info'](_0x8c97('0xf'),_0x41a511,_0x8c97('0x10'));logger[_0x8c97('0x11')](_0x8c97('0x12'),_0x41a511,_0x8c97('0x10'),JSON[_0x8c97('0x13')](_0x17aef0));if(_0x17aef0[_0x8c97('0x14')]){if(_0x17aef0[_0x8c97('0x14')][_0x8c97('0x15')]===0x1f4){logger['error'](_0x8c97('0xf'),_0x41a511,_0x17aef0[_0x8c97('0x14')]['message']);return _0x26ff40(_0x17aef0[_0x8c97('0x14')][_0x8c97('0x16')]);}logger['error'](_0x8c97('0xf'),_0x41a511,_0x17aef0['error']['message']);return _0x332cd1(_0x17aef0['error'][_0x8c97('0x16')]);}else{logger[_0x8c97('0x17')](_0x8c97('0xf'),_0x41a511,_0x8c97('0x10'));_0x332cd1(_0x17aef0[_0x8c97('0x18')][_0x8c97('0x16')]);}})[_0x8c97('0x19')](function(_0xe3be1){logger[_0x8c97('0x14')]('Interval,\x20%s,\x20%s',_0x41a511,_0xe3be1);_0x26ff40(_0xe3be1);});});}exports[_0x8c97('0x1a')]=function(_0x3f7ac7){var _0x18cffa=this;return new Promise(function(_0x3b57ed,_0x272010){return db[_0x8c97('0x1b')][_0x8c97('0x1c')]({'raw':_0x3f7ac7[_0x8c97('0x1d')]?_0x3f7ac7[_0x8c97('0x1d')][_0x8c97('0x1e')]===undefined?!![]:![]:!![],'where':_0x3f7ac7[_0x8c97('0x1d')]?_0x3f7ac7[_0x8c97('0x1d')][_0x8c97('0x1f')]||null:null,'attributes':_0x3f7ac7[_0x8c97('0x1d')]?_0x3f7ac7[_0x8c97('0x1d')][_0x8c97('0x20')]||null:null,'limit':_0x3f7ac7['options']?_0x3f7ac7[_0x8c97('0x1d')][_0x8c97('0x21')]||null:null,'include':_0x3f7ac7[_0x8c97('0x1d')]?_0x3f7ac7['options']['include']?_[_0x8c97('0x22')](_0x3f7ac7['options'][_0x8c97('0x23')],function(_0x1f2dd5){return{'model':db[_0x1f2dd5[_0x8c97('0x24')]],'as':_0x1f2dd5['as'],'attributes':_0x1f2dd5[_0x8c97('0x20')],'include':_0x1f2dd5[_0x8c97('0x23')]?_[_0x8c97('0x22')](_0x1f2dd5[_0x8c97('0x23')],function(_0x5132c5){return{'model':db[_0x5132c5['model']],'as':_0x5132c5['as'],'attributes':_0x5132c5[_0x8c97('0x20')],'include':_0x5132c5[_0x8c97('0x23')]?_[_0x8c97('0x22')](_0x5132c5['include'],function(_0x49b7fa){return{'model':db[_0x49b7fa[_0x8c97('0x24')]],'as':_0x49b7fa['as'],'attributes':_0x49b7fa[_0x8c97('0x20')]};}):[]};}):[]};}):[]:[]})[_0x8c97('0xe')](function(_0x1609de){logger[_0x8c97('0x17')](_0x8c97('0x1a'),_0x3f7ac7);logger['debug'](_0x8c97('0x1a'),_0x3f7ac7,JSON['stringify'](_0x1609de));_0x3b57ed(_0x1609de);})[_0x8c97('0x19')](function(_0x521969){logger[_0x8c97('0x14')](_0x8c97('0x1a'),_0x521969['message'],_0x3f7ac7);_0x272010(_0x18cffa[_0x8c97('0x14')](0x1f4,_0x521969['message']));});});};exports[_0x8c97('0x25')]=function(_0x63b903){var _0x4e26a4=this;return new Promise(function(_0x2ebba4,_0x4451d6){return db[_0x8c97('0x1b')]['find']({'raw':_0x63b903['options']?_0x63b903[_0x8c97('0x1d')][_0x8c97('0x1e')]===undefined?!![]:![]:!![],'where':_0x63b903[_0x8c97('0x1d')]?_0x63b903['options'][_0x8c97('0x1f')]||null:null,'attributes':_0x63b903['options']?_0x63b903['options'][_0x8c97('0x20')]||null:null,'include':_0x63b903[_0x8c97('0x1d')]?_0x63b903[_0x8c97('0x1d')][_0x8c97('0x23')]?_[_0x8c97('0x22')](_0x63b903[_0x8c97('0x1d')]['include'],function(_0x35ca85){return{'model':db[_0x35ca85[_0x8c97('0x24')]],'as':_0x35ca85['as'],'attributes':_0x35ca85[_0x8c97('0x20')],'include':_0x35ca85[_0x8c97('0x23')]?_[_0x8c97('0x22')](_0x35ca85[_0x8c97('0x23')],function(_0x157c7b){return{'model':db[_0x157c7b[_0x8c97('0x24')]],'as':_0x157c7b['as'],'attributes':_0x157c7b['attributes'],'include':_0x157c7b[_0x8c97('0x23')]?_[_0x8c97('0x22')](_0x157c7b[_0x8c97('0x23')],function(_0x33aa85){return{'model':db[_0x33aa85[_0x8c97('0x24')]],'as':_0x33aa85['as'],'attributes':_0x33aa85[_0x8c97('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x473d52){logger[_0x8c97('0x17')](_0x8c97('0x25'),_0x63b903);logger[_0x8c97('0x11')](_0x8c97('0x25'),_0x63b903,JSON[_0x8c97('0x13')](_0x473d52));_0x2ebba4(_0x473d52);})[_0x8c97('0x19')](function(_0x4639e2){logger[_0x8c97('0x14')]('ShowInterval',_0x4639e2[_0x8c97('0x16')],_0x63b903);_0x4451d6(_0x4e26a4[_0x8c97('0x14')](0x1f4,_0x4639e2[_0x8c97('0x16')]));});});};
\ No newline at end of file
+var _0x5fc3=['rpc','../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','Interval,\x20%s,\x20%s','result','catch','GetInterval','findAll','options','where','attributes','limit','include','map','model','ShowInterval','Interval','find','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x4e64d4,_0x2a1525){var _0x4bdf81=function(_0x5dfb40){while(--_0x5dfb40){_0x4e64d4['push'](_0x4e64d4['shift']());}};_0x4bdf81(++_0x2a1525);}(_0x5fc3,0xa8));var _0x35fc=function(_0x2f4c1c,_0x5a3dd4){_0x2f4c1c=_0x2f4c1c-0x0;var _0x25e0f2=_0x5fc3[_0x2f4c1c];return _0x25e0f2;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('Interval,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('Interval,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('Interval,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}exports[_0x35fc('0x16')]=function(_0x553677){var _0x41e165=this;return new Promise(function(_0x363e47,_0x2e513b){return db['Interval'][_0x35fc('0x17')]({'raw':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x19')]||null:null,'attributes':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x1a')]||null:null,'limit':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x1b')]||null:null,'include':_0x553677[_0x35fc('0x18')]?_0x553677['options'][_0x35fc('0x1c')]?_[_0x35fc('0x1d')](_0x553677[_0x35fc('0x18')][_0x35fc('0x1c')],function(_0x3b4743){return{'model':db[_0x3b4743['model']],'as':_0x3b4743['as'],'attributes':_0x3b4743[_0x35fc('0x1a')],'include':_0x3b4743[_0x35fc('0x1c')]?_['map'](_0x3b4743[_0x35fc('0x1c')],function(_0x5a93df){return{'model':db[_0x5a93df[_0x35fc('0x1e')]],'as':_0x5a93df['as'],'attributes':_0x5a93df['attributes'],'include':_0x5a93df[_0x35fc('0x1c')]?_['map'](_0x5a93df[_0x35fc('0x1c')],function(_0xdfab9f){return{'model':db[_0xdfab9f['model']],'as':_0xdfab9f['as'],'attributes':_0xdfab9f['attributes']};}):[]};}):[]};}):[]:[]})[_0x35fc('0xb')](function(_0x58edb6){logger[_0x35fc('0xc')](_0x35fc('0x16'),_0x553677);logger['debug'](_0x35fc('0x16'),_0x553677,JSON[_0x35fc('0xf')](_0x58edb6));_0x363e47(_0x58edb6);})[_0x35fc('0x15')](function(_0x9f3c8a){logger[_0x35fc('0x10')](_0x35fc('0x16'),_0x9f3c8a[_0x35fc('0x12')],_0x553677);_0x2e513b(_0x41e165[_0x35fc('0x10')](0x1f4,_0x9f3c8a['message']));});});};exports[_0x35fc('0x1f')]=function(_0x220931){var _0x22af18=this;return new Promise(function(_0x52acc5,_0xe79f52){return db[_0x35fc('0x20')][_0x35fc('0x21')]({'raw':_0x220931[_0x35fc('0x18')]?_0x220931[_0x35fc('0x18')][_0x35fc('0x22')]===undefined?!![]:![]:!![],'where':_0x220931[_0x35fc('0x18')]?_0x220931[_0x35fc('0x18')][_0x35fc('0x19')]||null:null,'attributes':_0x220931[_0x35fc('0x18')]?_0x220931['options']['attributes']||null:null,'include':_0x220931[_0x35fc('0x18')]?_0x220931['options'][_0x35fc('0x1c')]?_[_0x35fc('0x1d')](_0x220931[_0x35fc('0x18')][_0x35fc('0x1c')],function(_0x271ba9){return{'model':db[_0x271ba9[_0x35fc('0x1e')]],'as':_0x271ba9['as'],'attributes':_0x271ba9['attributes'],'include':_0x271ba9[_0x35fc('0x1c')]?_[_0x35fc('0x1d')](_0x271ba9[_0x35fc('0x1c')],function(_0x4441d8){return{'model':db[_0x4441d8[_0x35fc('0x1e')]],'as':_0x4441d8['as'],'attributes':_0x4441d8[_0x35fc('0x1a')],'include':_0x4441d8['include']?_[_0x35fc('0x1d')](_0x4441d8[_0x35fc('0x1c')],function(_0x1fecdf){return{'model':db[_0x1fecdf['model']],'as':_0x1fecdf['as'],'attributes':_0x1fecdf[_0x35fc('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ecb2e){logger[_0x35fc('0xc')](_0x35fc('0x1f'),_0x220931);logger[_0x35fc('0xe')]('ShowInterval',_0x220931,JSON['stringify'](_0x2ecb2e));_0x52acc5(_0x2ecb2e);})['catch'](function(_0x20f5fe){logger['error'](_0x35fc('0x1f'),_0x20f5fe['message'],_0x220931);_0xe79f52(_0x22af18[_0x35fc('0x10')](0x1f4,_0x20f5fe[_0x35fc('0x12')]));});});};
\ No newline at end of file