Browse Source

timer

tags/v0.1.8
yuyuanshifu 4 years ago
parent
commit
cc75a0ec46
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      models/pull_list.go
  2. +2
    -2
      modules/timer/timer.go

+ 2
- 0
models/pull_list.go View File

@@ -5,6 +5,7 @@
package models

import (
"code.gitea.io/gitea/modules/setting"
"fmt"

"code.gitea.io/gitea/modules/base"
@@ -175,6 +176,7 @@ func GetUnTransformedMergedPullRequests() ([]*PullRequest, error) {
prs := make([]*PullRequest, 0, 10)
return prs, x.
Where("has_merged = ? AND is_transformed = ?",true, false).
And("to_timestamp(merged_unix) >= ?", setting.CommitValidDate).
Join("INNER", "issue", "issue.id = pull_request.issue_id").
Find(&prs)
}

+ 2
- 2
modules/timer/timer.go View File

@@ -18,8 +18,8 @@ func init() {
specCheckRepoBlockChainSuccess := "*/5 * * * *"
c.AddFunc(specCheckRepoBlockChainSuccess, repo.HandleBlockChainUnSuccessRepos)

//specCheckUnTransformedActions := "*/1 * * * *"
//c.AddFunc(specCheckUnTransformedActions, repo.HandleBlockChainMergedPulls)
specCheckUnTransformedPRs := "*/1 * * * *"
c.AddFunc(specCheckUnTransformedPRs, repo.HandleBlockChainMergedPulls)

//specCheckUnTransformedActions := "*/1 * * * *"
//c.AddFunc(specCheckUnTransformedActions, repo.HandleUnTransformedActions)


Loading…
Cancel
Save