Built motion from commit (unavailable).|2.3.1
[motion2.git] / server / api / interval / interval.rpc.js
index 2a637ef..f6e3cb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2123=['map','model','ShowInterval','Interval','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','Interval,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Interval,\x20%s,\x20%s','message','catch','GetInterval','findAll','options','raw','where','attributes','include'];(function(_0x3886f5,_0x509dab){var _0x5b84ae=function(_0x5a9675){while(--_0x5a9675){_0x3886f5['push'](_0x3886f5['shift']());}};_0x5b84ae(++_0x509dab);}(_0x2123,0x190));var _0x3212=function(_0x314054,_0x1ad72c){_0x314054=_0x314054-0x0;var _0x56d285=_0x2123[_0x314054];return _0x56d285;};'use strict';var _=require(_0x3212('0x0'));var util=require(_0x3212('0x1'));var moment=require(_0x3212('0x2'));var BPromise=require(_0x3212('0x3'));var rs=require(_0x3212('0x4'));var fs=require('fs');var Redis=require(_0x3212('0x5'));var db=require(_0x3212('0x6'))['db'];var utils=require(_0x3212('0x7'));var logger=require(_0x3212('0x8'))(_0x3212('0x9'));var config=require(_0x3212('0xa'));var jayson=require(_0x3212('0xb'));var client=jayson['client'][_0x3212('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2b1302,_0x1fec5d,_0x4b35e9){return new BPromise(function(_0x3e17a3,_0x56c38f){return client[_0x3212('0xd')](_0x2b1302,_0x4b35e9)[_0x3212('0xe')](function(_0x8ca483){logger[_0x3212('0xf')]('Interval,\x20%s,\x20%s',_0x1fec5d,'request\x20sent');logger[_0x3212('0x10')](_0x3212('0x11'),_0x1fec5d,_0x3212('0x12'),JSON[_0x3212('0x13')](_0x8ca483));if(_0x8ca483[_0x3212('0x14')]){if(_0x8ca483[_0x3212('0x14')][_0x3212('0x15')]===0x1f4){logger[_0x3212('0x14')](_0x3212('0x16'),_0x1fec5d,_0x8ca483[_0x3212('0x14')][_0x3212('0x17')]);return _0x56c38f(_0x8ca483[_0x3212('0x14')][_0x3212('0x17')]);}logger[_0x3212('0x14')](_0x3212('0x16'),_0x1fec5d,_0x8ca483[_0x3212('0x14')][_0x3212('0x17')]);return _0x3e17a3(_0x8ca483[_0x3212('0x14')][_0x3212('0x17')]);}else{logger[_0x3212('0xf')](_0x3212('0x16'),_0x1fec5d,_0x3212('0x12'));_0x3e17a3(_0x8ca483['result'][_0x3212('0x17')]);}})[_0x3212('0x18')](function(_0x2720c6){logger[_0x3212('0x14')](_0x3212('0x16'),_0x1fec5d,_0x2720c6);_0x56c38f(_0x2720c6);});});}exports[_0x3212('0x19')]=function(_0x21954a){var _0x5b952f=this;return new Promise(function(_0x4c1158,_0x1cad7b){return db['Interval'][_0x3212('0x1a')]({'raw':_0x21954a[_0x3212('0x1b')]?_0x21954a[_0x3212('0x1b')][_0x3212('0x1c')]===undefined?!![]:![]:!![],'where':_0x21954a[_0x3212('0x1b')]?_0x21954a['options'][_0x3212('0x1d')]||null:null,'attributes':_0x21954a[_0x3212('0x1b')]?_0x21954a['options'][_0x3212('0x1e')]||null:null,'limit':_0x21954a[_0x3212('0x1b')]?_0x21954a[_0x3212('0x1b')]['limit']||null:null,'include':_0x21954a['options']?_0x21954a[_0x3212('0x1b')][_0x3212('0x1f')]?_[_0x3212('0x20')](_0x21954a[_0x3212('0x1b')][_0x3212('0x1f')],function(_0x436ecd){return{'model':db[_0x436ecd['model']],'as':_0x436ecd['as'],'attributes':_0x436ecd['attributes'],'include':_0x436ecd[_0x3212('0x1f')]?_['map'](_0x436ecd[_0x3212('0x1f')],function(_0x3108a6){return{'model':db[_0x3108a6[_0x3212('0x21')]],'as':_0x3108a6['as'],'attributes':_0x3108a6['attributes'],'include':_0x3108a6[_0x3212('0x1f')]?_[_0x3212('0x20')](_0x3108a6[_0x3212('0x1f')],function(_0x4de92e){return{'model':db[_0x4de92e[_0x3212('0x21')]],'as':_0x4de92e['as'],'attributes':_0x4de92e[_0x3212('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3212('0xe')](function(_0x443a5){logger[_0x3212('0xf')](_0x3212('0x19'),_0x21954a);logger[_0x3212('0x10')](_0x3212('0x19'),_0x21954a,JSON[_0x3212('0x13')](_0x443a5));_0x4c1158(_0x443a5);})[_0x3212('0x18')](function(_0x31c672){logger[_0x3212('0x14')]('GetInterval',_0x31c672[_0x3212('0x17')],_0x21954a);_0x1cad7b(_0x5b952f[_0x3212('0x14')](0x1f4,_0x31c672[_0x3212('0x17')]));});});};exports[_0x3212('0x22')]=function(_0x402a01){var _0x309420=this;return new Promise(function(_0x3a7883,_0x5059bd){return db[_0x3212('0x23')]['find']({'raw':_0x402a01[_0x3212('0x1b')]?_0x402a01['options'][_0x3212('0x1c')]===undefined?!![]:![]:!![],'where':_0x402a01['options']?_0x402a01['options'][_0x3212('0x1d')]||null:null,'attributes':_0x402a01['options']?_0x402a01[_0x3212('0x1b')][_0x3212('0x1e')]||null:null,'include':_0x402a01[_0x3212('0x1b')]?_0x402a01['options'][_0x3212('0x1f')]?_[_0x3212('0x20')](_0x402a01[_0x3212('0x1b')]['include'],function(_0x4ccbd1){return{'model':db[_0x4ccbd1[_0x3212('0x21')]],'as':_0x4ccbd1['as'],'attributes':_0x4ccbd1[_0x3212('0x1e')],'include':_0x4ccbd1[_0x3212('0x1f')]?_[_0x3212('0x20')](_0x4ccbd1['include'],function(_0x2b0437){return{'model':db[_0x2b0437[_0x3212('0x21')]],'as':_0x2b0437['as'],'attributes':_0x2b0437[_0x3212('0x1e')],'include':_0x2b0437['include']?_[_0x3212('0x20')](_0x2b0437[_0x3212('0x1f')],function(_0x40a602){return{'model':db[_0x40a602[_0x3212('0x21')]],'as':_0x40a602['as'],'attributes':_0x40a602['attributes']};}):[]};}):[]};}):[]:[]})[_0x3212('0xe')](function(_0x3f157c){logger[_0x3212('0xf')](_0x3212('0x22'),_0x402a01);logger['debug']('ShowInterval',_0x402a01,JSON['stringify'](_0x3f157c));_0x3a7883(_0x3f157c);})['catch'](function(_0xb2908a){logger[_0x3212('0x14')](_0x3212('0x22'),_0xb2908a[_0x3212('0x17')],_0x402a01);_0x5059bd(_0x309420['error'](0x1f4,_0xb2908a[_0x3212('0x17')]));});});};
\ No newline at end of file
+var _0x31f0=['error','code','message','result','GetInterval','Interval','findAll','options','raw','where','attributes','include','model','then','catch','ShowInterval','find','map','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','request','info','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x447675,_0x3af6fe){var _0x553e5a=function(_0x270123){while(--_0x270123){_0x447675['push'](_0x447675['shift']());}};_0x553e5a(++_0x3af6fe);}(_0x31f0,0xb7));var _0x031f=function(_0x1a3f88,_0x38a506){_0x1a3f88=_0x1a3f88-0x0;var _0x4d7534=_0x31f0[_0x1a3f88];return _0x4d7534;};'use strict';var _=require(_0x031f('0x0'));var util=require('util');var moment=require(_0x031f('0x1'));var BPromise=require('bluebird');var rs=require(_0x031f('0x2'));var fs=require('fs');var Redis=require(_0x031f('0x3'));var db=require(_0x031f('0x4'))['db'];var utils=require(_0x031f('0x5'));var logger=require('../../config/logger')(_0x031f('0x6'));var config=require(_0x031f('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3dc98e,_0x487e65,_0x365f59){return new BPromise(function(_0x4300b4,_0x2569b6){return client[_0x031f('0x8')](_0x3dc98e,_0x365f59)['then'](function(_0x2e5624){logger[_0x031f('0x9')](_0x031f('0xa'),_0x487e65,_0x031f('0xb'));logger[_0x031f('0xc')](_0x031f('0xd'),_0x487e65,_0x031f('0xb'),JSON[_0x031f('0xe')](_0x2e5624));if(_0x2e5624['error']){if(_0x2e5624[_0x031f('0xf')][_0x031f('0x10')]===0x1f4){logger[_0x031f('0xf')](_0x031f('0xa'),_0x487e65,_0x2e5624[_0x031f('0xf')][_0x031f('0x11')]);return _0x2569b6(_0x2e5624[_0x031f('0xf')]['message']);}logger[_0x031f('0xf')](_0x031f('0xa'),_0x487e65,_0x2e5624[_0x031f('0xf')][_0x031f('0x11')]);return _0x4300b4(_0x2e5624[_0x031f('0xf')]['message']);}else{logger['info'](_0x031f('0xa'),_0x487e65,_0x031f('0xb'));_0x4300b4(_0x2e5624[_0x031f('0x12')][_0x031f('0x11')]);}})['catch'](function(_0x1dc4a7){logger[_0x031f('0xf')]('Interval,\x20%s,\x20%s',_0x487e65,_0x1dc4a7);_0x2569b6(_0x1dc4a7);});});}exports[_0x031f('0x13')]=function(_0x535e70){var _0x421f75=this;return new Promise(function(_0x5f2199,_0x563bc8){return db[_0x031f('0x14')][_0x031f('0x15')]({'raw':_0x535e70[_0x031f('0x16')]?_0x535e70[_0x031f('0x16')][_0x031f('0x17')]===undefined?!![]:![]:!![],'where':_0x535e70[_0x031f('0x16')]?_0x535e70[_0x031f('0x16')][_0x031f('0x18')]||null:null,'attributes':_0x535e70['options']?_0x535e70[_0x031f('0x16')][_0x031f('0x19')]||null:null,'limit':_0x535e70[_0x031f('0x16')]?_0x535e70['options']['limit']||null:null,'include':_0x535e70[_0x031f('0x16')]?_0x535e70['options'][_0x031f('0x1a')]?_['map'](_0x535e70['options']['include'],function(_0x971691){return{'model':db[_0x971691[_0x031f('0x1b')]],'as':_0x971691['as'],'attributes':_0x971691[_0x031f('0x19')],'include':_0x971691[_0x031f('0x1a')]?_['map'](_0x971691[_0x031f('0x1a')],function(_0x5a64c0){return{'model':db[_0x5a64c0[_0x031f('0x1b')]],'as':_0x5a64c0['as'],'attributes':_0x5a64c0[_0x031f('0x19')],'include':_0x5a64c0[_0x031f('0x1a')]?_['map'](_0x5a64c0[_0x031f('0x1a')],function(_0x3b2a51){return{'model':db[_0x3b2a51['model']],'as':_0x3b2a51['as'],'attributes':_0x3b2a51[_0x031f('0x19')]};}):[]};}):[]};}):[]:[]})[_0x031f('0x1c')](function(_0x2403e9){logger['info'](_0x031f('0x13'),_0x535e70);logger[_0x031f('0xc')](_0x031f('0x13'),_0x535e70,JSON[_0x031f('0xe')](_0x2403e9));_0x5f2199(_0x2403e9);})[_0x031f('0x1d')](function(_0x301bd2){logger['error'](_0x031f('0x13'),_0x301bd2[_0x031f('0x11')],_0x535e70);_0x563bc8(_0x421f75[_0x031f('0xf')](0x1f4,_0x301bd2[_0x031f('0x11')]));});});};exports[_0x031f('0x1e')]=function(_0x2d24f0){var _0x378692=this;return new Promise(function(_0x87dc07,_0x2034ac){return db[_0x031f('0x14')][_0x031f('0x1f')]({'raw':_0x2d24f0['options']?_0x2d24f0[_0x031f('0x16')][_0x031f('0x17')]===undefined?!![]:![]:!![],'where':_0x2d24f0[_0x031f('0x16')]?_0x2d24f0[_0x031f('0x16')][_0x031f('0x18')]||null:null,'attributes':_0x2d24f0[_0x031f('0x16')]?_0x2d24f0[_0x031f('0x16')][_0x031f('0x19')]||null:null,'include':_0x2d24f0[_0x031f('0x16')]?_0x2d24f0[_0x031f('0x16')][_0x031f('0x1a')]?_[_0x031f('0x20')](_0x2d24f0[_0x031f('0x16')]['include'],function(_0x38061b){return{'model':db[_0x38061b[_0x031f('0x1b')]],'as':_0x38061b['as'],'attributes':_0x38061b['attributes'],'include':_0x38061b[_0x031f('0x1a')]?_[_0x031f('0x20')](_0x38061b['include'],function(_0x17b93c){return{'model':db[_0x17b93c[_0x031f('0x1b')]],'as':_0x17b93c['as'],'attributes':_0x17b93c[_0x031f('0x19')],'include':_0x17b93c[_0x031f('0x1a')]?_['map'](_0x17b93c['include'],function(_0x36ab13){return{'model':db[_0x36ab13['model']],'as':_0x36ab13['as'],'attributes':_0x36ab13[_0x031f('0x19')]};}):[]};}):[]};}):[]:[]})[_0x031f('0x1c')](function(_0x43ef89){logger['info']('ShowInterval',_0x2d24f0);logger[_0x031f('0xc')]('ShowInterval',_0x2d24f0,JSON['stringify'](_0x43ef89));_0x87dc07(_0x43ef89);})[_0x031f('0x1d')](function(_0x45e3a4){logger[_0x031f('0xf')](_0x031f('0x1e'),_0x45e3a4[_0x031f('0x11')],_0x2d24f0);_0x2034ac(_0x378692[_0x031f('0xf')](0x1f4,_0x45e3a4[_0x031f('0x11')]));});});};
\ No newline at end of file