[source,swift]
----
func getReadableStatus(job: Job) -> String {
  let status: String;
  if (job.isRunning) {
     status = "Running";
  }
  else {
     status = job.hasErrors ? "Failed" : "Succeeded"; 
  }
  return status;
}
----
