mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-16 02:45:54 -07:00
chore: push image processing to a dedicated thread
This commit is contained in:
parent
a35d1391a6
commit
aba2b76def
9 changed files with 168 additions and 54 deletions
|
|
@ -47,6 +47,7 @@ type SubmitListenOpts struct {
|
|||
Time time.Time
|
||||
UserID int32
|
||||
Client string
|
||||
IP *ImageProcessor
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
@ -69,6 +70,7 @@ func SubmitListen(ctx context.Context, store db.DB, opts SubmitListenOpts) error
|
|||
ArtistName: opts.Artist,
|
||||
Mbzc: opts.MbzCaller,
|
||||
TrackTitle: opts.TrackTitle,
|
||||
IP: opts.IP,
|
||||
})
|
||||
if err != nil {
|
||||
l.Error().Err(err).Msg("Failed to associate artists to listen")
|
||||
|
|
@ -90,6 +92,7 @@ func SubmitListen(ctx context.Context, store db.DB, opts SubmitListenOpts) error
|
|||
TrackName: opts.TrackTitle,
|
||||
Mbzc: opts.MbzCaller,
|
||||
Artists: artists,
|
||||
IP: opts.IP,
|
||||
})
|
||||
if err != nil {
|
||||
l.Error().Err(err).Msg("Failed to associate release group to listen")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue