ocr is working
This commit is contained in:
@@ -42,6 +42,12 @@ func setupOcr(t *testing.T) (*gin.Engine, string, *repository.Repository) {
|
||||
handlers.Store = store
|
||||
handlers.Ocr = service.NewOcr(repo, uploadDir, "fra+eng", stubEngine{text: "HELLO OCR"})
|
||||
|
||||
// Worker OCR borné — le handler n'enfile plus que le job, le traitement
|
||||
// tourne sur un worker de contexte.
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go handlers.Ocr.Run(ctx, 1)
|
||||
t.Cleanup(cancel)
|
||||
|
||||
gin.SetMode(gin.TestMode)
|
||||
r := gin.New()
|
||||
handlers.RegisterRoutes(r)
|
||||
|
||||
Reference in New Issue
Block a user