refactor: handling context in goroutines

This commit is contained in:
Jacky 2025-05-04 13:36:54 +00:00
parent ecb2ad786b
commit 1a2758ac5b
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
15 changed files with 161 additions and 140 deletions

View file

@ -1,11 +1,13 @@
package kernel
import (
"context"
"github.com/0xJacky/Nginx-UI/query"
"github.com/uozi-tech/cosy/logger"
)
func RegisterAcmeUser() {
func RegisterAcmeUser(ctx context.Context) {
a := query.AcmeUser
users, _ := a.Where(a.RegisterOnStartup.Is(true)).Find()
for _, user := range users {