Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved logging

  • Loading branch information...
commit faf0116005af3d1bab472f2ed727c5ca2d6bed62 1 parent f9593d5
Lukas Rytz authored
9 app/controllers/Application.scala
View
@@ -224,7 +224,8 @@ object Application extends Controller {
private[controllers] def doRefreshAll() {
for (commit <- Commit.runningCommits) {
Logger("refreshing build "+ commit)
- submitBuildTask(commit.sha, doRefresh(commit.sha))
+ val ok = submitBuildTask(commit.sha, doRefresh(commit.sha))
+ if (!ok) Logger.info("could not refresh build "+ commit.sha)
}
}
@@ -308,8 +309,10 @@ object Application extends Controller {
//val newCommits = GithubTools.revisionStream().takeWhile(_.sha != latest.sha).toList
Logger.info("Fetched new commits: "+ newCommits)
Commit.addCommits(newCommits)
- for (commit <- newCommits)
- submitBuildTask(commit.sha, doStartBuild(commit.sha))
+ for (commit <- newCommits) {
+ val ok = submitBuildTask(commit.sha, doStartBuild(commit.sha))
+ if (!ok) Logger.error("failed to start build for new commit "+ commit.sha)
+ }
}
}
}
7 app/controllers/jenkins/JenkinsTools.scala
View
@@ -35,8 +35,9 @@ object JenkinsTools {
}
})
val builds = (res \ "builds").arrayValues.map(_.convertTo[JenkinsBuild])
- Logger.info("existing builds: "+ builds)
- builds.map(_.number)
+ val r = builds.map(_.number)
+ Logger.info("existing builds: "+ r)
+ r
}
def buildStream(buildIds: List[Int] = existingBuilds()): Stream[JenkinsBuildInfo] = buildIds match {
@@ -110,7 +111,7 @@ object JenkinsTools {
result
}
})
- Logger.info("started build, http result "+ res)
+ Logger.info("started jenkins build for "+ sha)
true
}
Please sign in to comment.
Something went wrong with that request. Please try again.