lab5 done
This commit is contained in:
+9
-1
@@ -63,7 +63,15 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal("invalid S3 config")
|
||||
}
|
||||
handler := chat.NewChat(useCase, cfg.CursorKey).WithAttachments(attachment.New(pool, objectStore))
|
||||
options, err := attachment.LoadOptions()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
attachments := attachment.NewAsync(pool, objectStore, options)
|
||||
background, stopPublisher := context.WithCancel(context.Background())
|
||||
defer stopPublisher()
|
||||
go attachments.RunPublisher(background, redisClient)
|
||||
handler := chat.NewChat(useCase, cfg.CursorKey).WithAttachments(attachments)
|
||||
port := cfg.Port
|
||||
e := handler.Router()
|
||||
e.Server.ReadHeaderTimeout = 5 * time.Second
|
||||
|
||||
Reference in New Issue
Block a user