- return arvados.Vocabulary{
- Tags: map[string]arvados.VocabularyTag{},
- }, err
- }
- go watchVocabulary(logger, conn.cluster.API.VocabularyPath, func() {
- logger.Info("vocabulary file changed, it'll be reloaded next time it's needed")
- conn.reloadVocabulary = true
- })
- } else if conn.reloadVocabulary {
- // Requested reload of vocabulary file.
- conn.reloadVocabulary = false
- err := conn.loadVocabularyFile()
- if err != nil {
- logger.WithError(err).Error("error reloading vocabulary file - ignoring")
- } else {
- logger.Info("vocabulary file reloaded successfully")