File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ func (w *Watcher) Stop() {
251251 if config .AppConfig .General .Recovery .Enabled {
252252 // Store current CT Indexes before shutting down
253253 filePath := config .AppConfig .General .Recovery .CTIndexFile
254+
254255 err := metrics .Metrics .SaveCertIndexes (filePath )
255256 if err != nil {
256257 log .Printf ("Failed to save CT index file: %v\n " , err )
@@ -281,7 +282,6 @@ func (w *Watcher) CreateIndexFile(filePath string) error {
281282 }
282283
283284 normalizedURL := normalizeCtlogURL (transparencyLog .URL )
284- // Check if the log is already being watched
285285 metrics .Metrics .Init (operator .Name , normalizedURL )
286286 log .Println ("Fetching STH for" , normalizedURL )
287287
@@ -306,7 +306,7 @@ func (w *Watcher) CreateIndexFile(filePath string) error {
306306 log .Printf ("Skipping retired CT log: %s\n " , transparencyLog .MonitoringURL )
307307 continue
308308 }
309- // Check if the log is already being watched
309+
310310 normalizedURL := normalizeCtlogURL (transparencyLog .MonitoringURL )
311311 metrics .Metrics .Init (operator .Name , normalizedURL )
312312 log .Println ("Fetching checkpoint for" , normalizedURL )
Original file line number Diff line number Diff line change @@ -119,8 +119,6 @@ func initViper(configPath string) *viper.Viper {
119119 v .SetDefault ("general.recovery.enabled" , false )
120120 v .SetDefault ("general.recovery.ct_index_file" , "./ct_index.json" )
121121
122- // TODO check for missing file?!
123- // Config file
124122 if configPath != "" {
125123 v .SetConfigFile (configPath )
126124 } else {
You can’t perform that action at this time.
0 commit comments