equal
deleted
inserted
replaced
883 val progress = |
883 val progress = |
884 new Database_Progress(progress_db, build_progress, |
884 new Database_Progress(progress_db, build_progress, |
885 output_stopped = build_context.master, |
885 output_stopped = build_context.master, |
886 hostname = hostname, |
886 hostname = hostname, |
887 context_uuid = build_uuid, |
887 context_uuid = build_uuid, |
888 kind = "build_process") |
888 kind = "build_process", |
|
889 timeout = Some(build_delay)) |
889 (progress, progress.agent_uuid) |
890 (progress, progress.agent_uuid) |
890 } |
891 } |
891 catch { case exn: Throwable => close(); throw exn } |
892 catch { case exn: Throwable => close(); throw exn } |
892 } |
893 } |
893 } |
894 } |
927 protected def synchronized_database[A](label: String)(body: => A): A = |
928 protected def synchronized_database[A](label: String)(body: => A): A = |
928 synchronized { |
929 synchronized { |
929 _build_database match { |
930 _build_database match { |
930 case None => body |
931 case None => body |
931 case Some(db) => |
932 case Some(db) => |
932 progress.asInstanceOf[Database_Progress].sync() |
|
933 Build_Process.private_data.transaction_lock(db, label = label) { |
933 Build_Process.private_data.transaction_lock(db, label = label) { |
934 _state = Build_Process.private_data.pull_database(db, worker_uuid, hostname, _state) |
934 _state = Build_Process.private_data.pull_database(db, worker_uuid, hostname, _state) |
935 val res = body |
935 val res = body |
936 _state = |
936 _state = |
937 Build_Process.private_data.update_database(db, worker_uuid, build_uuid, hostname, _state) |
937 Build_Process.private_data.update_database(db, worker_uuid, build_uuid, hostname, _state) |