refreshFactSchemas method
Implementation
Future refreshFactSchemas() async {
_loaded.start();
await _factSchemaApi
.list(offset: 100)
.timeout(5.seconds, onTimeout: () => IFactSchemaList.of(data: []))
.then((schemas) async {
var schemasByKey = schemas.data.keyed((schema) => "${schema.ref}");
await _factSchemas.sync(schemasByKey);
_loaded.complete(true);
log.info("FACT: Loaded ${_factSchemas.length} fact schemas");
});
}