modules/sync: add UniqueQueue
This commit is contained in:
parent
43297148b2
commit
c1ecb6c60a
3 changed files with 76 additions and 62 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue