lab5 done

This commit is contained in:
Khakimov Dmitrij
2026-11-10 22:13:40 +03:00
parent b2bd7501d3
commit cbe9d8748c
63 changed files with 8907 additions and 307 deletions
+9 -1
View File
@@ -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