mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +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:
@ -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];
|
||||
|
Reference in New Issue
Block a user