Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / services / agi / events.js
index 5903b21..65ff96b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2fbb=['emit','error','message','E_AGI_SERVER_ERROR','EventEmitter','ioredis','./error','../../config/environment','redis','localhost','subscribe','agi'];(function(_0x225455,_0x4f2550){var _0x1c7c68=function(_0x644867){while(--_0x644867){_0x225455['push'](_0x225455['shift']());}};_0x1c7c68(++_0x4f2550);}(_0x2fbb,0x1e4));var _0xb2fb=function(_0x5a6cdf,_0x56d1cd){_0x5a6cdf=_0x5a6cdf-0x0;var _0x1fdcc1=_0x2fbb[_0x5a6cdf];return _0x1fdcc1;};'use strict';var _=require('lodash');var EventEmitter=require('events')[_0xb2fb('0x0')];var Redis=require(_0xb2fb('0x1'));var AGIError=require(_0xb2fb('0x2'));var config=require(_0xb2fb('0x3'));config['redis']=_['defaults'](config[_0xb2fb('0x4')],{'host':_0xb2fb('0x5'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0xb2fb('0x4')]);sub[_0xb2fb('0x6')](_0xb2fb('0x7'),function(_0x355cc4){if(_0x355cc4)return eventEmitter[_0xb2fb('0x8')](_0xb2fb('0x9'),new AGIError('E_AGI_SERVER_ERROR',_0x355cc4));});sub['on'](_0xb2fb('0xa'),function(_0x1a7051,_0x220e62){if(_0x1a7051!==_0xb2fb('0x7'))return;try{var _0x107a56=JSON['parse'](_0x220e62);eventEmitter[_0xb2fb('0x8')]('projectUpdate',_0x107a56);}catch(_0x280815){eventEmitter[_0xb2fb('0x8')](_0xb2fb('0x9'),new AGIError(_0xb2fb('0xb'),_0x280815));}});module['exports']={'EventEmitter':eventEmitter};
\ No newline at end of file
+var _0xb6b7=['redis','subscribe','E_AGI_SERVER_ERROR','agi','parse','emit','projectUpdate','exports','lodash','events','ioredis','./error','../../config/environment','defaults','localhost'];(function(_0x102ff9,_0x907658){var _0x24fa97=function(_0x3622ff){while(--_0x3622ff){_0x102ff9['push'](_0x102ff9['shift']());}};_0x24fa97(++_0x907658);}(_0xb6b7,0xf8));var _0x7b6b=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xb6b7[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x7b6b('0x0'));var EventEmitter=require(_0x7b6b('0x1'))['EventEmitter'];var Redis=require(_0x7b6b('0x2'));var AGIError=require(_0x7b6b('0x3'));var config=require(_0x7b6b('0x4'));config['redis']=_[_0x7b6b('0x5')](config['redis'],{'host':_0x7b6b('0x6'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0x7b6b('0x7')]);sub[_0x7b6b('0x8')]('agi',function(_0x4f9406){if(_0x4f9406)return eventEmitter['emit']('error',new AGIError(_0x7b6b('0x9'),_0x4f9406));});sub['on']('message',function(_0x487aa0,_0x1f1a2d){if(_0x487aa0!==_0x7b6b('0xa'))return;try{var _0x328523=JSON[_0x7b6b('0xb')](_0x1f1a2d);eventEmitter[_0x7b6b('0xc')](_0x7b6b('0xd'),_0x328523);}catch(_0x5494a4){eventEmitter[_0x7b6b('0xc')]('error',new AGIError(_0x7b6b('0x9'),_0x5494a4));}});module[_0x7b6b('0xe')]={'EventEmitter':eventEmitter};
\ No newline at end of file