wip: port queue.StartAnalyses
This commit is contained in:
committed by
=Michael Hohn
parent
cf595f338a
commit
8cd4f4d809
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user