fetchAndLoadDatabaseSince refreshes all dbConfigs if they where last fetched past the refreshInterval. It then returns found if the fetched configs contain the dbName.
(ctx context.Context, dbName string, refreshInterval *base.ConfigDuration)
| 1713 | // fetchAndLoadDatabaseSince refreshes all dbConfigs if they where last fetched past the refreshInterval. It then returns found if |
| 1714 | // the fetched configs contain the dbName. |
| 1715 | func (sc *ServerContext) fetchAndLoadDatabaseSince(ctx context.Context, dbName string, refreshInterval *base.ConfigDuration) (found bool, err error) { |
| 1716 | configs, err := sc.fetchConfigsSince(ctx, refreshInterval) |
| 1717 | if err != nil { |
| 1718 | return false, err |
| 1719 | } |
| 1720 | |
| 1721 | found = configs[dbName] != nil |
| 1722 | return found, nil |
| 1723 | } |
| 1724 | |
| 1725 | func (sc *ServerContext) fetchAndLoadDatabase(nonContextStruct base.NonCancellableContext, dbName string, forceReload bool) (found bool, err error) { |
| 1726 | sc._databasesLock.Lock() |
no test coverage detected