Skip to content

Commit

Permalink
ci: Adding debug level to investigate problem
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Aug 8, 2022
1 parent f7275b5 commit a1ff570
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/fibr/templates/exif.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{ define "exif-modal-btn" }}
{{ if not .Exif.IsZero }}
{{ if .Exif.HasData }}
<a href="#exif-modal" class="button button-icon exif-button" title="Show exif">
<img class="icon exif" src="{{ url "/svg/info" }}?fill=black" alt="Exif">
</a>
{{ end }}
{{ end }}

{{ define "exif-modal" }}
{{ if not .Exif.IsZero }}
{{ if .Exif.HasData }}
<style type="text/css" nonce="{{ .nonce }}">
.exif-button {
bottom: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/ViBiOh/ChatPotte v0.1.0
github.com/ViBiOh/absto v0.6.2
github.com/ViBiOh/auth/v2 v2.13.0
github.com/ViBiOh/exas v0.4.2
github.com/ViBiOh/exas v0.5.0
github.com/ViBiOh/flags v1.2.0
github.com/ViBiOh/httputils/v4 v4.46.1
github.com/ViBiOh/vith v0.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ github.com/ViBiOh/absto v0.6.2 h1:KRNEufp/jT5Onvn//wR3OiOQnGRQ8TztCztAskJBk1E=
github.com/ViBiOh/absto v0.6.2/go.mod h1:ZoXcCx5C+xU9R6SBP4HPXSjf3WZcaVIfFCciiViZfCs=
github.com/ViBiOh/auth/v2 v2.13.0 h1:AGPU5WFefkZHvLJkWA8bpMb0a2hu9zJNoYOiz7NLKpQ=
github.com/ViBiOh/auth/v2 v2.13.0/go.mod h1:eGqz0ln1SdfuOG8N2XsruKh8NCU7Plx0P5mQPHsNWxQ=
github.com/ViBiOh/exas v0.4.2 h1:W84et5rOaeG0n0kl60QJHoa6RmP4614vD8DTPL3BvyU=
github.com/ViBiOh/exas v0.4.2/go.mod h1:gYLOTipAUoE7mTrUd3Albe2zKFJKkX135+ALSc9QmGM=
github.com/ViBiOh/exas v0.5.0 h1:ZL5v5rUOkkwo6PxhbOVe96L0RUre7SfStaVcqhE/IbU=
github.com/ViBiOh/exas v0.5.0/go.mod h1:sKRV/vz85Vj0caT+a3XWVFp0gyzXe36eZWL+XKge93E=
github.com/ViBiOh/flags v1.2.0 h1:DaujjNXzD29KxKyp4eZdn7c9+uBN5DokWgDAe7DcUmc=
github.com/ViBiOh/flags v1.2.0/go.mod h1:UyMB5zeD/aId7Xw3x7577ZNU298JmukzOcV8p/H2W1s=
github.com/ViBiOh/httputils/v4 v4.46.1 h1:TWSfDGZe8biy5LOSDmyvKdoEfMNS/LZ2y3Ksh7lvbGk=
Expand Down
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
1 change: 1 addition & 0 deletions pkg/exif/amqp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func (a App) AmqpHandler(message amqp.Delivery) error {
}

if resp.Exif.IsZero() {
logger.Debug("[exif] [handler] %s: no exif", resp.Item.Pathname)
return nil
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/exif/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (a App) handleStartEvent(ctx context.Context, event provider.Event) error {

item := event.Item
if !forced && a.hasMetadata(ctx, item) {
logger.Debug("[exif] [start] %s: has metadata and not forced", item.Pathname)
return nil
}

Expand All @@ -79,6 +80,7 @@ func (a App) handleStartEvent(ctx context.Context, event provider.Event) error {

func (a App) handleUploadEvent(ctx context.Context, item absto.Item, aggregate bool) error {
if !a.CanHaveExif(item) {
logger.Debug("[exif] [upload] %s: can't have exif", item.Pathname)
return nil
}

Expand Down
1 change: 1 addition & 0 deletions pkg/exif/exif.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (a App) extractAndSaveExif(ctx context.Context, item absto.Item) (exif exas
exif.Description = previousExif.Description

if exif.IsZero() {
logger.Debug("[exif] [save] %s: no exif", item.Pathname)
return
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/exif/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (a App) hasMetadata(ctx context.Context, item absto.Item) bool {
return false
}

return len(data.Data) != 0
return data.HasData()
}

func (a App) loadExif(ctx context.Context, item absto.Item) (exas.Exif, error) {
Expand Down

0 comments on commit a1ff570

Please sign in to comment.