fix(relay):修复多个并发问题
This commit is contained in:
1 parent
a59b8850f0
commit
ccf457592b
31 files changed
+357
-366
No files matched your search
@@ -31,6 +31,7 @@ import (
|
||||
"github.com/qianfree/team-api/internal/handler/relay"
|
||||
setupHandler "github.com/qianfree/team-api/internal/handler/setup"
|
||||
"github.com/qianfree/team-api/internal/plugin"
|
||||
"github.com/qianfree/team-api/relay/scheduler"
|
||||
"github.com/qianfree/team-api/web"
|
||||
)
|
||||
|
||||
@@ -164,6 +165,10 @@ var (
|
||||
billing.CleanExpiredPreDeducts(ctx)
|
||||
return nil
|
||||
})
|
||||
cs.Register("affinity_cache_cleanup", "*/5 * * * *", func(ctx context.Context) error {
|
||||
scheduler.GetGlobalAffinity().CleanExpired()
|
||||
return nil
|
||||
})
|
||||
cs.StartBackground(ctx)
|
||||
|
||||
// Initialize plugin system (must be after CronScheduler init)
|
||||
|
||||
Reference in new issue
Block a user