add more logging to cron
This commit is contained in:
parent
1ddf7963fe
commit
664da1d436
1 changed files with 10 additions and 0 deletions
|
@ -79,6 +79,8 @@ func (s *Scheduler) run(ctx context.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.Debugf("cron: found %d pending jobs", len(jobs))
|
||||||
|
|
||||||
for _, job := range jobs {
|
for _, job := range jobs {
|
||||||
// jobs can be manually disabled in the user interface,
|
// jobs can be manually disabled in the user interface,
|
||||||
// and should be skipped.
|
// and should be skipped.
|
||||||
|
@ -162,6 +164,14 @@ func (s *Scheduler) run(ctx context.Context) error {
|
||||||
Sender: commit.Author.Login,
|
Sender: commit.Author.Login,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.WithFields(
|
||||||
|
logrus.Fields{
|
||||||
|
"cron": job.Name,
|
||||||
|
"repo": repo.Slug,
|
||||||
|
"branch": repo.Branch,
|
||||||
|
"sha": commit.Sha,
|
||||||
|
}).Warnln("cron: trigger build")
|
||||||
|
|
||||||
_, err = s.trigger.Trigger(ctx, repo, hook)
|
_, err = s.trigger.Trigger(ctx, repo, hook)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.WithFields(
|
logger.WithFields(
|
||||||
|
|
Loading…
Reference in a new issue