Built motion from commit f67b3b02.|2.6.31
[motion2.git] / server / services / agi / events.js
index 7a4f311..fd37644 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c3a=['message','emit','projectUpdate','exports','lodash','events','EventEmitter','ioredis','./error','../../config/environment','redis','defaults','localhost','subscribe','agi','error','E_AGI_SERVER_ERROR'];(function(_0x3b1ee6,_0x4837e8){var _0x47fc2f=function(_0x26df88){while(--_0x26df88){_0x3b1ee6['push'](_0x3b1ee6['shift']());}};_0x47fc2f(++_0x4837e8);}(_0x1c3a,0x114));var _0xa1c3=function(_0x2afa1e,_0x5f37fa){_0x2afa1e=_0x2afa1e-0x0;var _0x4b3ab7=_0x1c3a[_0x2afa1e];return _0x4b3ab7;};'use strict';var _=require(_0xa1c3('0x0'));var EventEmitter=require(_0xa1c3('0x1'))[_0xa1c3('0x2')];var Redis=require(_0xa1c3('0x3'));var AGIError=require(_0xa1c3('0x4'));var config=require(_0xa1c3('0x5'));config[_0xa1c3('0x6')]=_[_0xa1c3('0x7')](config[_0xa1c3('0x6')],{'host':_0xa1c3('0x8'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0xa1c3('0x6')]);sub[_0xa1c3('0x9')](_0xa1c3('0xa'),function(_0x4501f7){if(_0x4501f7)return eventEmitter['emit'](_0xa1c3('0xb'),new AGIError(_0xa1c3('0xc'),_0x4501f7));});sub['on'](_0xa1c3('0xd'),function(_0x4784e1,_0x1accea){if(_0x4784e1!==_0xa1c3('0xa'))return;try{var _0x2f25c2=JSON['parse'](_0x1accea);eventEmitter[_0xa1c3('0xe')](_0xa1c3('0xf'),_0x2f25c2);}catch(_0xa26b9d){eventEmitter[_0xa1c3('0xe')](_0xa1c3('0xb'),new AGIError(_0xa1c3('0xc'),_0xa26b9d));}});module[_0xa1c3('0x10')]={'EventEmitter':eventEmitter};
\ No newline at end of file
+var _0xa493=['localhost','agi','emit','error','parse','projectUpdate','E_AGI_SERVER_ERROR','exports','events','EventEmitter','ioredis','../../config/environment','redis'];(function(_0x483860,_0x430e2a){var _0x5673b2=function(_0x5d4911){while(--_0x5d4911){_0x483860['push'](_0x483860['shift']());}};_0x5673b2(++_0x430e2a);}(_0xa493,0xff));var _0x3a49=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xa493[_0xfae23b];return _0x200640;};'use strict';var _=require('lodash');var EventEmitter=require(_0x3a49('0x0'))[_0x3a49('0x1')];var Redis=require(_0x3a49('0x2'));var AGIError=require('./error');var config=require(_0x3a49('0x3'));config[_0x3a49('0x4')]=_['defaults'](config[_0x3a49('0x4')],{'host':_0x3a49('0x5'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config['redis']);sub['subscribe'](_0x3a49('0x6'),function(_0x353b3b){if(_0x353b3b)return eventEmitter[_0x3a49('0x7')](_0x3a49('0x8'),new AGIError('E_AGI_SERVER_ERROR',_0x353b3b));});sub['on']('message',function(_0x38b0f0,_0x3fa4e){if(_0x38b0f0!=='agi')return;try{var _0x801257=JSON[_0x3a49('0x9')](_0x3fa4e);eventEmitter[_0x3a49('0x7')](_0x3a49('0xa'),_0x801257);}catch(_0x281002){eventEmitter[_0x3a49('0x7')](_0x3a49('0x8'),new AGIError(_0x3a49('0xb'),_0x281002));}});module[_0x3a49('0xc')]={'EventEmitter':eventEmitter};
\ No newline at end of file