mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-28 19:25:36 +02:00
Support reading timezone info from env (#748)
* add tzdata package * updated timezone documentation * add missing bind-mount from updated docs * Add timezone deprecation warnings and related logging to backup commands * fix lint CI job error * Address PR comments: refactor timezone deprecation warning handling, update docs
This commit is contained in:
committed by
GitHub
parent
0955d6fe80
commit
6a83ce4034
@@ -36,6 +36,13 @@ func (c *command) runAsCommand() error {
|
||||
}
|
||||
|
||||
for _, config := range configurations {
|
||||
warnings, warnErr := config.timezoneDeprecationWarnings()
|
||||
if warnErr != nil {
|
||||
return errwrap.Wrap(warnErr, "error collecting startup warnings")
|
||||
}
|
||||
for _, w := range warnings {
|
||||
c.logger.Warn(w)
|
||||
}
|
||||
if err := runScript(config); err != nil {
|
||||
return errwrap.Wrap(err, "error running script")
|
||||
}
|
||||
@@ -102,6 +109,14 @@ func (c *command) schedule(strategy configStrategy) error {
|
||||
|
||||
for _, cfg := range configurations {
|
||||
config := cfg
|
||||
warnings, warnErr := config.timezoneDeprecationWarnings()
|
||||
if warnErr != nil {
|
||||
return errwrap.Wrap(warnErr, "error collecting startup warnings")
|
||||
}
|
||||
for _, w := range warnings {
|
||||
c.logger.Warn(w)
|
||||
}
|
||||
|
||||
id, err := c.cr.AddFunc(config.BackupCronExpression, func() {
|
||||
c.logger.Info(
|
||||
fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user