Skip to content

Commit

Permalink
cmd/initContainer: Simplify creating a daily ticker
Browse files Browse the repository at this point in the history
Fallout from e1635c0

#1494
  • Loading branch information
debarshiray committed May 22, 2024
1 parent d8289fb commit 8c0064a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/cmd/initContainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,7 @@ func initContainer(cmd *cobra.Command, args []string) error {

logrus.Debug("Setting up daily ticker")

daily, err := time.ParseDuration("24h")
if err != nil {
panicMsg := fmt.Sprintf("failed to parse duration: %v", err)
panic(panicMsg)
}

tickerDaily := time.NewTicker(daily)
tickerDaily := time.NewTicker(24 * time.Hour)
defer tickerDaily.Stop()

logrus.Debug("Setting up watches for file system events")
Expand Down

0 comments on commit 8c0064a

Please sign in to comment.