Documentation ¶
Index ¶
- Constants
- Variables
- func GitGetDependenciesGo(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func GitListContributorFromRepo(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func GitListRepoFromOrg(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func GitScoreContributor(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func GitScoreRepository(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- type Contributor
- type GitOrg
- type JobFunc
- type JobFuncWrapper
- type Repository
Constants ¶
View Source
const ( KeyGitListRepoFromOrg = "git_list_repo_from_org" KeyGitGetDependenciesPrepend = "git_get_dependencies_" )
View Source
const (
KeyGitGetDependenciesGo = "git_get_dependencies_go"
)
View Source
const (
KeyGitListContributorFromRepo = "git_list_contributor_from_repo"
)
View Source
const (
KeyGitScoreContributor = "git_score_contributor"
)
View Source
const (
KeyGitScoreRepository = "git_score_repository"
)
Variables ¶
View Source
var ( ErrImmediateReschedule = errors.New("commit tx, and reschedule ASAP") ErrDidNotReschedule = errors.New("no need to reschedule, we are done") )
Functions ¶
func GitGetDependenciesGo ¶
GetDependenciesGo : A jobfunc to retrieve list of dependencies and sort out ones on github so we can queue more jobs for rating
func GitListContributorFromRepo ¶
GitListContributorFromRepo is a jobfunc to acquire the list of contributors from a repository.
func GitListRepoFromOrg ¶
func GitScoreContributor ¶
Types ¶
type Contributor ¶
type Contributor struct { C *github.Contributor RepoID int Score int }
type JobFunc ¶
JobFunc should do a thing. Return either: nil => wrapper will schedule the next cron (if a cron), then commit the tx. ErrImmediateReschedule => wrapper will commit the tx, then try it again immediately. ErrDidNotReschedule => wrapper will rollback the tx, and if a cron, will not reschedule or retry. any other error => wrapper rollback the tx, and allow que to reschedule
type JobFuncWrapper ¶
type Repository ¶
type Repository struct { R *github.Repository OrgID int ParentID int Score int }
Click to show internal directories.
Click to hide internal directories.