Able to analyze right now

This commit is contained in:
2024-12-26 22:55:16 +08:00
parent 790b123410
commit 044b0eefca
2 changed files with 13 additions and 3 deletions

View File

@ -66,7 +66,12 @@ func createAttachmentDirectly(c *fiber.Ctx) error {
tx.Commit()
metadata.Pool = &pool
services.PublishAnalyzeTask(metadata)
if !c.QueryBool("analyzeNow", false) {
services.AnalyzeAttachment(metadata)
} else {
services.PublishAnalyzeTask(metadata)
}
return c.JSON(metadata)
}