mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 00:10:49 +00:00
implement sync logic
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"github.com/cncd/logging"
|
||||
"github.com/cncd/pubsub"
|
||||
"github.com/drone/drone/cache"
|
||||
"github.com/drone/drone/model"
|
||||
"github.com/drone/drone/router/middleware/session"
|
||||
"github.com/drone/drone/store"
|
||||
@@ -149,7 +148,10 @@ func EventStream(c *gin.Context) {
|
||||
user := session.User(c)
|
||||
repo := map[string]bool{}
|
||||
if user != nil {
|
||||
repo, _ = cache.GetRepoMap(c, user)
|
||||
repos, _ := store.FromContext(c).RepoList(user)
|
||||
for _, r := range repos {
|
||||
repo[r.FullName] = true
|
||||
}
|
||||
}
|
||||
|
||||
ticker := time.NewTicker(pingPeriod)
|
||||
|
||||
Reference in New Issue
Block a user