Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(video): delete connection close #110

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/models/rawvideo.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
package models

import "GuGoTik/src/storage/database"

type RawVideo struct {
ActorId uint32
VideoId uint32
Title string
FileName string
CoverName string
}

func init() {
if err := database.Client.AutoMigrate(&RawVideo{}); err != nil {
panic(err)
}
}
2 changes: 1 addition & 1 deletion src/services/publish/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func main() {

var srv PublishServiceImpl
var probe healthImpl.ProbeImpl
defer CloseMQConn()
//defer CloseMQConn()
publish.RegisterPublishServiceServer(s, srv)
health.RegisterHealthServer(s, &probe)
if err := consul.RegisterConsul(config.PublishRpcServerName, config.PublishRpcServerPort); err != nil {
Expand Down
8 changes: 8 additions & 0 deletions src/services/videoprocessor/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ func SummaryConsume(channel *amqp.Channel) {
}).Errorf("Failed to get summary of an audio from ChatGPT")
logging.SetSpanError(span, err)
summary = ""

errorHandler(d, true, logger, &span)
span.End()
continue
}

select {
Expand All @@ -124,6 +128,10 @@ func SummaryConsume(channel *amqp.Channel) {
}).Errorf("Failed to get keywords of an audio from ChatGPT")
logging.SetSpanError(span, err)
keywords = ""

errorHandler(d, true, logger, &span)
span.End()
continue
}

// Update summary information to database
Expand Down
Loading