mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
[Persistence] Add in-line documentation
Add clarifying comments to reflect changes to procedure used for loading models from persistence introduced in support of reducing latency in loading domain objects introduced by the WARP Server adapter, WTD-644.
This commit is contained in:
parent
63990b5e13
commit
11f6175592
@ -22,10 +22,14 @@ define(
|
||||
function PersistedModelProvider(persistenceService, $q, SPACE) {
|
||||
function promiseModels(ids) {
|
||||
return $q.all(ids.filter(function (id) {
|
||||
// Filter out "namespaced" identifiers; these are
|
||||
// not expected to be found in database. See WTD-659.
|
||||
return id.indexOf(":") === -1;
|
||||
}).map(function (id) {
|
||||
// Read remaining objects from persistence
|
||||
return persistenceService.readObject(SPACE, id);
|
||||
})).then(function (models) {
|
||||
// Packaged the result as id->object
|
||||
var result = {};
|
||||
ids.forEach(function (id, index) {
|
||||
result[id] = models[index];
|
||||
|
Loading…
Reference in New Issue
Block a user