Skip to content

Commit

Permalink
feat: Adding debug log for update date
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jan 29, 2023
1 parent 0e7ec15 commit a5cab89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions infra/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ spec:
FIBR_EXIF_URL: http://exas
FIBR_IGNORE_PATTERN: '.st(folder|ignore)'
FIBR_LOGGER_JSON: 'true'
FIBR_LOGGER_LEVEL: DEBUG
FIBR_PUBLIC_URL: https://fibr.vibioh.fr
FIBR_REDIS_ADDRESS: 'redis:80'
FIBR_SANITIZE_ON_START: 'true'
Expand Down
5 changes: 5 additions & 0 deletions pkg/metadata/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ import (

absto "github.com/ViBiOh/absto/pkg/model"
"github.com/ViBiOh/fibr/pkg/provider"
"github.com/ViBiOh/httputils/v4/pkg/logger"
)

func (a App) updateDate(ctx context.Context, item absto.Item, data provider.Metadata) error {
if data.Date.IsZero() || item.Date.Equal(data.Date) {
logger.WithField("item", item.Pathname).
WithField("item_date", item.Date.String()).
WithField("exif_date", data.Date.String()).
Debug("no exif date or already equal")
return nil
}

Expand Down

0 comments on commit a5cab89

Please sign in to comment.