wip: replace some references to the old prototype
This commit is contained in:
committed by
=Michael Hohn
parent
1f52a0ab37
commit
ccf064fe6c
@@ -16,8 +16,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
mutex sync.Mutex
|
||||
jobs map[int][]co.AnalyzeJob = make(map[int][]co.AnalyzeJob)
|
||||
info map[co.JobSpec]co.JobInfo = make(map[co.JobSpec]co.JobInfo)
|
||||
status map[co.JobSpec]co.Status = make(map[co.JobSpec]co.Status)
|
||||
result map[co.JobSpec]co.AnalyzeResult = make(map[co.JobSpec]co.AnalyzeResult)
|
||||
mutex sync.Mutex
|
||||
)
|
||||
|
||||
type StorageSingle struct {
|
||||
@@ -174,3 +177,21 @@ func PackageResults(ar co.AnalyzeResult, owre co.OwnerRepo, vaid int) (zipPath s
|
||||
}
|
||||
return zpath, nil
|
||||
}
|
||||
|
||||
func GetJobList(sessionid int) []co.AnalyzeJob {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
return jobs[sessionid]
|
||||
}
|
||||
|
||||
func GetJobInfo(js co.JobSpec) co.JobInfo {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
return info[js]
|
||||
}
|
||||
|
||||
func GetStatus(sessionid int, orl co.OwnerRepo) co.Status {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
return status[co.JobSpec{ID: sessionid, OwnerRepo: orl}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user