feat(cmd/daemon): new flag to set clean cache interval
This commit is contained in:
		| @@ -16,7 +16,9 @@ import ( | ||||
| ) | ||||
|  | ||||
| // Start the daemon | ||||
| func Start(cnf *config.Configuration, compression bool) error { | ||||
| func Start(cnf *config.Configuration, cleanCacheIntervall time.Duration, compression bool) error { | ||||
|  | ||||
| 	ticker := time.Tick(cleanCacheIntervall) | ||||
|  | ||||
| 	interrupt := make(chan os.Signal, 1) | ||||
| 	signal.Notify(interrupt, os.Interrupt, os.Kill, syscall.SIGTERM) | ||||
| @@ -30,8 +32,6 @@ func Start(cnf *config.Configuration, compression bool) error { | ||||
|  | ||||
| 	temperatures := make([]*types.Temperature, 0) | ||||
|  | ||||
| 	ticker := time.Tick(time.Second * 300) | ||||
|  | ||||
| 	rgbLEDs := cnf.GetRGBLEDs(config.ENABLED) | ||||
| 	err := rgbled.Green(rgbLEDs) | ||||
| 	if err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user