Built motion from commit (unavailable).|2.3.7
[motion2.git] / server / services / routing / server / interval.js
index 44158f2..d430c6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3916=['result','condition','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED','stop','length','push','iftime\x20%s','indexOf','true','catch','[%s][INTERVAL]\x20%s','all','some','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','when','log','stack','util','bluebird','jayson/promise','lodash','routing','client','http','request','error','message'];(function(_0x9987a,_0x883339){var _0x15ca8b=function(_0x3ff74e){while(--_0x3ff74e){_0x9987a['push'](_0x9987a['shift']());}};_0x15ca8b(++_0x883339);}(_0x3916,0x15e));var _0x6391=function(_0x383356,_0x33d2f5){_0x383356=_0x383356-0x0;var _0x32ee5a=_0x3916[_0x383356];return _0x32ee5a;};'use strict';var util=require(_0x6391('0x0'));var BPromise=require(_0x6391('0x1'));var jayson=require(_0x6391('0x2'));var _=require(_0x6391('0x3'));var logger=require('../../../config/logger')(_0x6391('0x4'));var client=jayson[_0x6391('0x5')][_0x6391('0x6')]({'port':0x232a});function request(_0x2671c5,_0xb37818){return new BPromise(function(_0x1fe088,_0x23f201){return client[_0x6391('0x7')](_0x2671c5,_0xb37818)['then'](function(_0x24ec09){if(_0x24ec09['error']){return _0x23f201(_0x24ec09[_0x6391('0x8')][_0x6391('0x9')]);}else{return _0x1fe088(_0x24ec09[_0x6391('0xa')]);}})['catch'](function(_0x1c905c){return _0x23f201(_0x1c905c);});});}exports[_0x6391('0xb')]=function(_0x3dcadd,_0x484cef,_0x243d08){return function(_0x44fad9){if(_0x243d08['rules']&&!_0x243d08['rules'][_0x3dcadd]){logger[_0x6391('0xc')](_0x6391('0xd'),_0x3dcadd);return _0x44fad9[_0x6391('0xe')]();}var _0x41eb54=[];for(var _0x291ed3=0x0;_0x291ed3<_0x484cef[_0x6391('0xf')];_0x291ed3+=0x1){_0x41eb54[_0x6391('0x10')](request('Command',{'command':util['format'](_0x6391('0x11'),_0x484cef[_0x291ed3])})['then'](function(_0x336669){return _0x336669&&_0x336669[_0x6391('0x9')]&&_0x336669[_0x6391('0x9')][_0x6391('0x12')](_0x6391('0x13'))>=0x0?!![]:![];})[_0x6391('0x14')](function(_0x100b69){logger['error'](_0x6391('0x15'),_0x3dcadd,_0x484cef[_0x291ed3]);}));}BPromise[_0x6391('0x16')](_0x41eb54)['then'](function(_0x44c869){var _0x82d0b3=_[_0x6391('0x17')](_0x44c869);logger[_0x6391('0xc')](_0x6391('0x18'),_0x3dcadd,_0x484cef[_0x6391('0x19')](_0x6391('0x1a')),_0x82d0b3);_0x44fad9[_0x6391('0x1b')](_0x82d0b3);})[_0x6391('0x14')](function(_0x4d1bf8){console[_0x6391('0x1c')](_0x4d1bf8);logger['error'](_0x6391('0x18'),_0x3dcadd,_0x484cef[_0x6391('0x19')](_0x6391('0x1a')),_0x4d1bf8[_0x6391('0x1d')]);_0x44fad9['stop']();});};};
\ No newline at end of file
+var _0x2f67=['indexOf','true','[%s][INTERVAL]\x20%s','some','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','when','catch','stack','stop','util','bluebird','lodash','http','request','then','error','result','condition','rules','info','push','message'];(function(_0x5ba6ec,_0xf98374){var _0x8418a6=function(_0x26575f){while(--_0x26575f){_0x5ba6ec['push'](_0x5ba6ec['shift']());}};_0x8418a6(++_0xf98374);}(_0x2f67,0x83));var _0x72f6=function(_0x1d7fcf,_0x49f676){_0x1d7fcf=_0x1d7fcf-0x0;var _0x56b54a=_0x2f67[_0x1d7fcf];return _0x56b54a;};'use strict';var util=require(_0x72f6('0x0'));var BPromise=require(_0x72f6('0x1'));var jayson=require('jayson/promise');var _=require(_0x72f6('0x2'));var logger=require('../../../config/logger')('routing');var client=jayson['client'][_0x72f6('0x3')]({'port':0x232a});function request(_0x4aea68,_0x437784){return new BPromise(function(_0x49aba8,_0x58cb2c){return client[_0x72f6('0x4')](_0x4aea68,_0x437784)[_0x72f6('0x5')](function(_0x226e12){if(_0x226e12['error']){return _0x58cb2c(_0x226e12[_0x72f6('0x6')]['message']);}else{return _0x49aba8(_0x226e12[_0x72f6('0x7')]);}})['catch'](function(_0x12b061){return _0x58cb2c(_0x12b061);});});}exports[_0x72f6('0x8')]=function(_0x44ea93,_0x26358b,_0x417b97){return function(_0x2d89e9){if(_0x417b97[_0x72f6('0x9')]&&!_0x417b97['rules'][_0x44ea93]){logger[_0x72f6('0xa')]('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x44ea93);return _0x2d89e9['stop']();}var _0xb10bb4=[];for(var _0x4adb9d=0x0;_0x4adb9d<_0x26358b['length'];_0x4adb9d+=0x1){_0xb10bb4[_0x72f6('0xb')](request('Command',{'command':util['format']('iftime\x20%s',_0x26358b[_0x4adb9d])})[_0x72f6('0x5')](function(_0x4ae9a5){return _0x4ae9a5&&_0x4ae9a5['message']&&_0x4ae9a5[_0x72f6('0xc')][_0x72f6('0xd')](_0x72f6('0xe'))>=0x0?!![]:![];})['catch'](function(_0xf70a90){logger[_0x72f6('0x6')](_0x72f6('0xf'),_0x44ea93,_0x26358b[_0x4adb9d]);}));}BPromise['all'](_0xb10bb4)[_0x72f6('0x5')](function(_0x7ebe4d){var _0x34ec59=_[_0x72f6('0x10')](_0x7ebe4d);logger[_0x72f6('0xa')](_0x72f6('0x11'),_0x44ea93,_0x26358b[_0x72f6('0x12')](_0x72f6('0x13')),_0x34ec59);_0x2d89e9[_0x72f6('0x14')](_0x34ec59);})[_0x72f6('0x15')](function(_0x5e3871){console['log'](_0x5e3871);logger['error'](_0x72f6('0x11'),_0x44ea93,_0x26358b[_0x72f6('0x12')](_0x72f6('0x13')),_0x5e3871[_0x72f6('0x16')]);_0x2d89e9[_0x72f6('0x17')]();});};};
\ No newline at end of file