Built motion from commit ac06311e.|2.6.28
[motion2.git] / server / services / agi / events.js
index ccdde7d..e2017d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa810=['projectUpdate','exports','events','EventEmitter','../../config/environment','redis','defaults','agi','emit','error','E_AGI_SERVER_ERROR','message','parse'];(function(_0x5904ea,_0x5b043f){var _0x2055e7=function(_0x377261){while(--_0x377261){_0x5904ea['push'](_0x5904ea['shift']());}};_0x2055e7(++_0x5b043f);}(_0xa810,0x12d));var _0x0a81=function(_0x27b3df,_0x34a01a){_0x27b3df=_0x27b3df-0x0;var _0x275390=_0xa810[_0x27b3df];return _0x275390;};'use strict';var _=require('lodash');var EventEmitter=require(_0x0a81('0x0'))[_0x0a81('0x1')];var Redis=require('ioredis');var AGIError=require('./error');var config=require(_0x0a81('0x2'));config[_0x0a81('0x3')]=_[_0x0a81('0x4')](config['redis'],{'host':'localhost','port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0x0a81('0x3')]);sub['subscribe'](_0x0a81('0x5'),function(_0x3e350f){if(_0x3e350f)return eventEmitter[_0x0a81('0x6')](_0x0a81('0x7'),new AGIError(_0x0a81('0x8'),_0x3e350f));});sub['on'](_0x0a81('0x9'),function(_0x28fb9,_0x2132e5){if(_0x28fb9!==_0x0a81('0x5'))return;try{var _0x244cc4=JSON[_0x0a81('0xa')](_0x2132e5);eventEmitter[_0x0a81('0x6')](_0x0a81('0xb'),_0x244cc4);}catch(_0x58ada6){eventEmitter[_0x0a81('0x6')](_0x0a81('0x7'),new AGIError(_0x0a81('0x8'),_0x58ada6));}});module[_0x0a81('0xc')]={'EventEmitter':eventEmitter};
\ No newline at end of file
+var _0x8988=['agi','parse','projectUpdate','exports','lodash','EventEmitter','./error','../../config/environment','redis','defaults','localhost','subscribe','emit','error','E_AGI_SERVER_ERROR'];(function(_0x1e05c1,_0x3cffa3){var _0x15f1ca=function(_0x3a9594){while(--_0x3a9594){_0x1e05c1['push'](_0x1e05c1['shift']());}};_0x15f1ca(++_0x3cffa3);}(_0x8988,0x18a));var _0x8898=function(_0x3c5433,_0x515ff7){_0x3c5433=_0x3c5433-0x0;var _0x425f26=_0x8988[_0x3c5433];return _0x425f26;};'use strict';var _=require(_0x8898('0x0'));var EventEmitter=require('events')[_0x8898('0x1')];var Redis=require('ioredis');var AGIError=require(_0x8898('0x2'));var config=require(_0x8898('0x3'));config[_0x8898('0x4')]=_[_0x8898('0x5')](config[_0x8898('0x4')],{'host':_0x8898('0x6'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config['redis']);sub[_0x8898('0x7')]('agi',function(_0x3aa006){if(_0x3aa006)return eventEmitter[_0x8898('0x8')](_0x8898('0x9'),new AGIError(_0x8898('0xa'),_0x3aa006));});sub['on']('message',function(_0x18fc29,_0x246f52){if(_0x18fc29!==_0x8898('0xb'))return;try{var _0x1ae6ce=JSON[_0x8898('0xc')](_0x246f52);eventEmitter[_0x8898('0x8')](_0x8898('0xd'),_0x1ae6ce);}catch(_0x35ae3d){eventEmitter['emit']('error',new AGIError(_0x8898('0xa'),_0x35ae3d));}});module[_0x8898('0xe')]={'EventEmitter':eventEmitter};
\ No newline at end of file