mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-04 17:41:50 +08:00
fix(common): avoid empty context (#22508)
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/db"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/auth"
|
||||
modules "yunion.io/x/onecloud/pkg/mcclient/modules/identity"
|
||||
"yunion.io/x/onecloud/pkg/util/ctx"
|
||||
)
|
||||
|
||||
type tenantCacheSyncWorker struct {
|
||||
@@ -34,7 +35,7 @@ type tenantCacheSyncWorker struct {
|
||||
|
||||
func (w *tenantCacheSyncWorker) Run() {
|
||||
log.Debugf("[tenantCacheSyncWorker] Run project cache sync worker ...")
|
||||
err := syncProjects(context.Background(), w.ids)
|
||||
err := syncProjects(ctx.CtxWithTime(), w.ids)
|
||||
if err != nil {
|
||||
log.Errorf("fail to syncProjects %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user