diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-04-24 09:49:23 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-05 09:12:46 +0200 |
commit | 05ef8418b7d644c93d6121a3c26ee4a0a50309ef (patch) | |
tree | 3c4b547126c9a08c434adda924a4f18cbfb029c9 /mod/mod-build-task.cxx | |
parent | 68385233360f59b03a4036b1fae2f47764cc206f (diff) |
Revert "Also pass build hints to build_building() and build_built()"
This reverts commit 9aa7ca59da55089e6f00733476356ef90bef25d2.
Diffstat (limited to 'mod/mod-build-task.cxx')
-rw-r--r-- | mod/mod-build-task.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index 305aaca..6be77f6 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -1109,7 +1109,7 @@ handle (request& rq, response& rs) const tenant_service_build_queued* tsq (nullptr); optional<pair<tenant_service, shared_ptr<build>>> tss; vector<build> qbs; - tenant_service_base::build_hints bhs; + tenant_service_build_queued::build_queued_hints qhs; optional<build_state> initial_state; bool rebuild_forced_build (false); bool rebuild_interrupted_rebuild (false); @@ -1181,14 +1181,14 @@ handle (request& rq, response& rs) return r; }; - auto build_hints = [this] (const build_package& p) + auto queue_hints = [this] (const build_package& p) { buildable_package_count tpc ( build_db_->query_value<buildable_package_count> ( query<buildable_package_count>::build_tenant::id == p.id.tenant)); - return tenant_service_base::build_hints {tpc == 1, - p.configs.size () == 1}; + return tenant_service_build_queued::build_queued_hints { + tpc == 1, p.configs.size () == 1}; }; // Collect the auxiliary machines required for testing of the specified @@ -1975,7 +1975,7 @@ handle (request& rq, response& rs) (*initial_state != build_state::queued && !rebuild_forced_build)) { - bhs = build_hints (*p); + qhs = queue_hints (*p); t->queued_timestamp = system_clock::now (); build_db_->update (t); @@ -2215,8 +2215,6 @@ handle (request& rq, response& rs) tsb = dynamic_cast<const tenant_service_build_building*> (s); tsq = dynamic_cast<const tenant_service_build_queued*> (s); - bhs = build_hints (*p); - if (tsq != nullptr) { qbs = queue_builds (*p, *b); @@ -2230,6 +2228,8 @@ handle (request& rq, response& rs) // if (!qbs.empty () || !rebuild_interrupted_rebuild) { + qhs = queue_hints (*p); + t->queued_timestamp = system_clock::now (); build_db_->update (t); } @@ -2312,7 +2312,7 @@ handle (request& rq, response& rs) if (auto f = tsq->build_queued (ss, qbs, nullopt /* initial_state */, - bhs, + qhs, log_writer_)) { conn = build_db_->connection (); @@ -2344,7 +2344,7 @@ handle (request& rq, response& rs) if (auto f = tsq->build_queued (ss, qbs, initial_state, - bhs, + qhs, log_writer_)) { conn = build_db_->connection (); |