mirror of
https://github.com/mclueppers/xo-server.git
synced 2025-07-27 07:54:54 +02:00
Various updates.
This commit is contained in:
parent
10edf58bf9
commit
1f09d9e8b9
19
src/xo.js
19
src/xo.js
@ -249,7 +249,24 @@ Xo.prototype.start = function (cfg) {
|
|||||||
'replace': true,
|
'replace': true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})).fail(function (error) {
|
})).then(function () {
|
||||||
|
return xapi.call('event.register', ['*']);
|
||||||
|
}).then(function () {
|
||||||
|
return function loop() {
|
||||||
|
return xapi.call('event.next').then(function (event) {
|
||||||
|
event = event[0]; // @todo Handle multiple events.
|
||||||
|
|
||||||
|
var collection = xobjs[event.class];
|
||||||
|
if (collection)
|
||||||
|
{
|
||||||
|
// @todo Handle operation types.
|
||||||
|
collection.add(event.snapshot, {'replace': true});
|
||||||
|
}
|
||||||
|
|
||||||
|
return loop();
|
||||||
|
});
|
||||||
|
}();
|
||||||
|
}).fail(function (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user