mirror of https://github.com/1Panel-dev/1Panel
fix: 解决闭包传值
parent
d9a0ea1fe7
commit
c6eb0fafe0
|
@ -2,6 +2,7 @@ package job
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/1Panel-dev/1Panel/backend/app/dto/request"
|
"github.com/1Panel-dev/1Panel/backend/app/dto/request"
|
||||||
|
"github.com/1Panel-dev/1Panel/backend/app/model"
|
||||||
"github.com/1Panel-dev/1Panel/backend/app/repo"
|
"github.com/1Panel-dev/1Panel/backend/app/repo"
|
||||||
"github.com/1Panel-dev/1Panel/backend/app/service"
|
"github.com/1Panel-dev/1Panel/backend/app/service"
|
||||||
"github.com/1Panel-dev/1Panel/backend/constant"
|
"github.com/1Panel-dev/1Panel/backend/constant"
|
||||||
|
@ -29,9 +30,9 @@ func (w *website) Run() {
|
||||||
}
|
}
|
||||||
if site.ExpireDate.Before(now) {
|
if site.ExpireDate.Before(now) {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func(ws model.Website) {
|
||||||
stopWebsite(site.ID, &wg)
|
stopWebsite(ws.ID, &wg)
|
||||||
}()
|
}(site)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
Loading…
Reference in New Issue