diff options
author | Unknwon <u@gogs.io> | 2016-08-30 15:50:30 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-30 15:50:30 -0700 |
commit | c1ecb6c60a1acacf530e226b8043ca93d2fe4a07 (patch) | |
tree | 5df15490f2f6c53f1b633dbefaf4d99df48347f1 /models/pull.go | |
parent | 43297148b22b976d9cec0c56c863a704f3691c0e (diff) | |
download | gitea-c1ecb6c60a1acacf530e226b8043ca93d2fe4a07.tar.gz gitea-c1ecb6c60a1acacf530e226b8043ca93d2fe4a07.zip |
modules/sync: add UniqueQueue
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/pull.go b/models/pull.go index 64b347554c..100d4db435 100644 --- a/models/pull.go +++ b/models/pull.go @@ -20,8 +20,11 @@ import ( "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/process" "github.com/gogits/gogs/modules/setting" + "github.com/gogits/gogs/modules/sync" ) +var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) + type PullRequestType int const ( @@ -537,8 +540,6 @@ func (pr *PullRequest) UpdateCols(cols ...string) error { return err } -var PullRequestQueue = NewUniqueQueue(setting.Repository.PullRequestQueueLength) - // UpdatePatch generates and saves a new patch. func (pr *PullRequest) UpdatePatch() (err error) { if err = pr.GetHeadRepo(); err != nil { |