wip: port queue.StartAnalyses

This commit is contained in:
Michael Hohn
2024-05-20 20:07:39 -07:00
committed by =Michael Hohn
parent cf595f338a
commit 8cd4f4d809
3 changed files with 45 additions and 2 deletions

View File

@@ -210,3 +210,15 @@ func ResultAsFile(path string) (string, []byte, error) {
return fpath, file, nil
}
func SetStatus(sessionid int, orl co.OwnerRepo, s co.Status) {
mutex.Lock()
defer mutex.Unlock()
status[co.JobSpec{ID: sessionid, OwnerRepo: orl}] = s
}
func AddJob(sessionid int, job co.AnalyzeJob) {
mutex.Lock()
defer mutex.Unlock()
jobs[sessionid] = append(jobs[sessionid], job)
}