add queue

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-26 21:43:23 +02:00
parent 5d6aabf5b6
commit 9875ae3dfc
4 changed files with 36 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ type Query struct {
type Result struct {
Id string
Date time.Time
Status string // "pending", "completed"
Status string // "queued", "pending", "completed"
Query Query
LeakResult dataleak.LeakResult
@@ -39,9 +39,7 @@ func Search(s *server.Server, q Query, r *Result, mu *sync.RWMutex) {
var wg sync.WaitGroup
mu.Lock()
r.Date = time.Now()
r.Status = "pending"
r.Query = q
mu.Unlock()
wg.Add(3)