Skip to content

Commit

Permalink
fix: Trim status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pando85 committed Jan 22, 2024
1 parent 53fcbfc commit be95297
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"strings"
"time"
"transcoder/model"

Expand Down Expand Up @@ -361,7 +362,7 @@ func (S *SQLRepository) addNewTaskEvent(ctx context.Context, tx Transaction, eve
}

_, err = tx.ExecContext(ctx, "INSERT INTO video_events (video_id, video_event_id,worker_name,event_time,event_type,notification_type,status,message)"+
" VALUES ($1,$2,$3,$4,$5,$6,$7,$8)", event.Id.String(), event.EventID, event.WorkerName, time.Now(), event.EventType, event.NotificationType, event.Status, event.Message)
" VALUES ($1,$2,$3,$4,$5,$6,$7,$8)", event.Id.String(), event.EventID, event.WorkerName, time.Now(), event.EventType, event.NotificationType, event.Status, strings.TrimSpace(event.Message))
return err
}
func (S *SQLRepository) AddVideo(ctx context.Context, video *model.Video) error {
Expand Down

0 comments on commit be95297

Please sign in to comment.