We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/go-admin-team/go-admin/blob/master/app/jobs/jobbase.go
// Setup 初始化 func Setup(dbs map[string]*gorm.DB) { fmt.Println(time.Now().Format(timeFormat), " [INFO] JobCore Starting...") for k, db := range dbs { sdk.Runtime.SetCrontab(k, cronjob.NewWithSeconds()) setup(k, db) } } func setup(key string, db *gorm.DB) { crontab := sdk.Runtime.GetCrontabKey(key) //.... // 其中任务 crontab.Start() fmt.Println(time.Now().Format(timeFormat), " [INFO] JobCore start success.") // 关闭任务 defer crontab.Stop() select {} }
for k, db := range dbs {
是想对每个 db 循环执行setup?
setup 中 select {} 永久阻塞, 不会返回了
The text was updated successfully, but these errors were encountered:
这里是针对多租户添加的初始化db
Sorry, something went wrong.
No branches or pull requests
Reproduction link
https://github.com/go-admin-team/go-admin/blob/master/app/jobs/jobbase.go
Steps to reproduce
What is expected?
是想对每个 db 循环执行setup?
What is actually happening?
setup 中 select {} 永久阻塞, 不会返回了
The text was updated successfully, but these errors were encountered: