Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / services / routing / server / interval.js
index c84c9de..06e4528 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x85cb=['true','[%s][INTERVAL]\x20%s','all','some','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','log','stack','bluebird','jayson/promise','../../../config/logger','routing','http','request','then','error','message','result','catch','condition','rules','info','stop','push','format','iftime\x20%s','indexOf'];(function(_0x290d35,_0x5e0f78){var _0x112b51=function(_0x3c689a){while(--_0x3c689a){_0x290d35['push'](_0x290d35['shift']());}};_0x112b51(++_0x5e0f78);}(_0x85cb,0x191));var _0xb85c=function(_0x1af025,_0x441e1c){_0x1af025=_0x1af025-0x0;var _0x2ce543=_0x85cb[_0x1af025];return _0x2ce543;};'use strict';var util=require('util');var BPromise=require(_0xb85c('0x0'));var jayson=require(_0xb85c('0x1'));var _=require('lodash');var logger=require(_0xb85c('0x2'))(_0xb85c('0x3'));var client=jayson['client'][_0xb85c('0x4')]({'port':0x232a});function request(_0x1f3775,_0x32f93e){return new BPromise(function(_0x4d8a77,_0x588e94){return client[_0xb85c('0x5')](_0x1f3775,_0x32f93e)[_0xb85c('0x6')](function(_0x257fd8){if(_0x257fd8[_0xb85c('0x7')]){return _0x588e94(_0x257fd8[_0xb85c('0x7')][_0xb85c('0x8')]);}else{return _0x4d8a77(_0x257fd8[_0xb85c('0x9')]);}})[_0xb85c('0xa')](function(_0x2c3b71){return _0x588e94(_0x2c3b71);});});}exports[_0xb85c('0xb')]=function(_0x3e4800,_0x50ac34,_0x34b7bc){return function(_0x390302){if(_0x34b7bc[_0xb85c('0xc')]&&!_0x34b7bc[_0xb85c('0xc')][_0x3e4800]){logger[_0xb85c('0xd')]('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x3e4800);return _0x390302[_0xb85c('0xe')]();}var _0x3aa185=[];for(var _0x18dff4=0x0;_0x18dff4<_0x50ac34['length'];_0x18dff4+=0x1){_0x3aa185[_0xb85c('0xf')](request('Command',{'command':util[_0xb85c('0x10')](_0xb85c('0x11'),_0x50ac34[_0x18dff4])})[_0xb85c('0x6')](function(_0x75f643){return _0x75f643&&_0x75f643[_0xb85c('0x8')]&&_0x75f643[_0xb85c('0x8')][_0xb85c('0x12')](_0xb85c('0x13'))>=0x0?!![]:![];})['catch'](function(_0x43aad2){logger['error'](_0xb85c('0x14'),_0x3e4800,_0x50ac34[_0x18dff4]);}));}BPromise[_0xb85c('0x15')](_0x3aa185)[_0xb85c('0x6')](function(_0x421444){var _0x414c53=_[_0xb85c('0x16')](_0x421444);logger[_0xb85c('0xd')](_0xb85c('0x17'),_0x3e4800,_0x50ac34[_0xb85c('0x18')](_0xb85c('0x19')),_0x414c53);_0x390302['when'](_0x414c53);})['catch'](function(_0x15858a){console[_0xb85c('0x1a')](_0x15858a);logger[_0xb85c('0x7')](_0xb85c('0x17'),_0x3e4800,_0x50ac34[_0xb85c('0x18')](_0xb85c('0x19')),_0x15858a[_0xb85c('0x1b')]);_0x390302['stop']();});};};
\ No newline at end of file
+var _0x842a=['[%s][INTERVAL\x20NOT\x20VALID]\x20%s\x20%s','lodash','../../../utils/iftime','iftime','../../../config/logger','routing','condition','rules','[%s][INTERVAL]\x20ROUTING\x20STOPPED','stop','map','some','info','[%s][INTERVAL\x20VALID]\x20%s\x20%s','join','\x20|\x20','when'];(function(_0x29cdd8,_0x5a00c1){var _0xc6dd81=function(_0x166288){while(--_0x166288){_0x29cdd8['push'](_0x29cdd8['shift']());}};_0xc6dd81(++_0x5a00c1);}(_0x842a,0x133));var _0xa842=function(_0x60286b,_0x3247c1){_0x60286b=_0x60286b-0x0;var _0x5dff69=_0x842a[_0x60286b];return _0x5dff69;};'use strict';var _=require(_0xa842('0x0'));var iftime=require(_0xa842('0x1'))[_0xa842('0x2')];var logger=require(_0xa842('0x3'))(_0xa842('0x4'));exports[_0xa842('0x5')]=function(_0x28df3e,_0x30b58c,_0x2ebb78){return function(_0x560186){if(_0x2ebb78['rules']&&!_0x2ebb78[_0xa842('0x6')][_0x28df3e]){logger['info'](_0xa842('0x7'),_0x28df3e);return _0x560186[_0xa842('0x8')]();}var _0x26c8da=_0x30b58c[_0xa842('0x9')](function(_0x126cbb){return iftime(_0x126cbb);});var _0x49b573=_[_0xa842('0xa')](_0x26c8da);if(_0x49b573){logger[_0xa842('0xb')](_0xa842('0xc'),_0x28df3e,_0x30b58c[_0xa842('0xd')](_0xa842('0xe')),_0x49b573);_0x560186[_0xa842('0xf')](_0x49b573);}else{logger[_0xa842('0xb')](_0xa842('0x10'),_0x28df3e,_0x30b58c[_0xa842('0xd')]('\x20|\x20'));_0x560186[_0xa842('0x8')]();}};};
\ No newline at end of file