mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
refactor: extract types and pkgs to new files
This commit is contained in:
parent
4a92a03f31
commit
e109a7a6ce
15 changed files with 71 additions and 57 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/containrrr/watchtower/container"
|
||||
"github.com/containrrr/watchtower/internal/flags"
|
||||
"github.com/containrrr/watchtower/notifications"
|
||||
t "github.com/containrrr/watchtower/pkg/types"
|
||||
"github.com/robfig/cron"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ func Run(c *cobra.Command, names []string) {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
func runUpgradesOnSchedule(filter container.Filter) error {
|
||||
func runUpgradesOnSchedule(filter t.Filter) error {
|
||||
tryLockSem := make(chan bool, 1)
|
||||
tryLockSem <- true
|
||||
|
||||
|
|
@ -164,7 +165,7 @@ func runUpgradesOnSchedule(filter container.Filter) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func runUpdatesWithNotifications(filter container.Filter) {
|
||||
func runUpdatesWithNotifications(filter t.Filter) {
|
||||
notifier.StartNotification()
|
||||
updateParams := actions.UpdateParams{
|
||||
Filter: filter,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue