MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doPopulate

Method doPopulate

valdi/src/valdi/runtime/JavaScript/Modules/PersistentStore.cpp:188–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void PersistentStore::doPopulate() {
189 if (_activeDiskCache->exists(_diskCachePath)) {
190 auto result = _activeDiskCache->load(_diskCachePath);
191 if (!result) {
192 onPopulateFailure(result.error());
193 return;
194 }
195
196 auto populateResult = _store.populate(result.value());
197 if (!populateResult) {
198 onPopulateFailure(populateResult.error());
199 return;
200 }
201 }
202}
203
204void PersistentStore::setCurrentTimeSeconds(uint64_t timeSeconds) {
205 _store.setCurrentTimeSeconds(timeSeconds);

Callers 1

populateMethod · 0.95

Calls 5

existsMethod · 0.65
loadMethod · 0.65
errorMethod · 0.65
valueMethod · 0.65
populateMethod · 0.45

Tested by

no test coverage detected