mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-14 02:37:25 +01:00
Make archive migration threaded
This commit is contained in:
parent
a4a90074ee
commit
ff8f013b56
@ -207,8 +207,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for job := range ar.Iter() {
|
for job := range ar.Iter() {
|
||||||
fmt.Printf("Job %d\n", job.JobID)
|
// fmt.Printf("Job %d\n", job.JobID)
|
||||||
|
job := job
|
||||||
|
|
||||||
|
go func() {
|
||||||
path := getPath(job, dstPath, "meta.json")
|
path := getPath(job, dstPath, "meta.json")
|
||||||
err = os.MkdirAll(filepath.Dir(path), 0750)
|
err = os.MkdirAll(filepath.Dir(path), 0750)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -244,5 +246,6 @@ func main() {
|
|||||||
if err := f.Close(); err != nil {
|
if err := f.Close(); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user