equal
deleted
inserted
replaced
879 } |
879 } |
880 } |
880 } |
881 |
881 |
882 protected val log: Logger = Logger.make_system_log(progress, build_options) |
882 protected val log: Logger = Logger.make_system_log(progress, build_options) |
883 |
883 |
884 protected def init_cluster(remote_hosts: List[Build_Cluster.Host]): Build_Cluster = |
884 protected def init_build_cluster(remote_hosts: List[Build_Cluster.Host]): Build_Cluster = |
885 new Build_Cluster(build_context, remote_hosts, progress = build_progress) |
885 new Build_Cluster(build_context, remote_hosts, progress = build_progress) |
|
886 |
|
887 protected def exit_build_cluster(build_cluster: Build_Cluster): Boolean = { |
|
888 val results = build_cluster.join |
|
889 build_cluster.close() |
|
890 results.forall({ case Exn.Res(res) => res.ok case _ => false }) |
|
891 } |
886 |
892 |
887 private val _build_cluster = |
893 private val _build_cluster = |
888 try { |
894 try { |
889 val remote_hosts = build_context.build_hosts.filterNot(_.is_local) |
895 val remote_hosts = build_context.build_hosts.filterNot(_.is_local) |
890 if (build_context.master && _build_database.isDefined && remote_hosts.nonEmpty) { |
896 if (build_context.master && _build_database.isDefined && remote_hosts.nonEmpty) { |
891 Some(init_cluster(remote_hosts)) |
897 Some(init_build_cluster(remote_hosts)) |
892 } |
898 } |
893 else None |
899 else None |
894 } |
900 } |
895 catch { case exn: Throwable => close(); throw exn } |
901 catch { case exn: Throwable => close(); throw exn } |
896 |
902 |
1119 |
1125 |
1120 if (!check_jobs()) sleep() |
1126 if (!check_jobs()) sleep() |
1121 } |
1127 } |
1122 } |
1128 } |
1123 finally { |
1129 finally { |
1124 _build_cluster.foreach(_.stop()) |
1130 _build_cluster.foreach(exit_build_cluster) |
1125 stop_worker() |
1131 stop_worker() |
1126 if (build_context.master) stop_build() |
1132 if (build_context.master) stop_build() |
1127 } |
1133 } |
1128 |
1134 |
1129 synchronized_database("Build_Process.result") { |
1135 synchronized_database("Build_Process.result") { |