From d4900d85f7a5d791f89821713d02d3dd19361044 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Feb 2024 11:17:25 +0300 Subject: Add support for tenant-associated service notifications --- mod/mod-builds.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mod/mod-builds.cxx') diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx index f260b72..b0de618 100644 --- a/mod/mod-builds.cxx +++ b/mod/mod-builds.cxx @@ -225,13 +225,19 @@ build_query (const brep::vector* config_ids, // Build result. // const string& rs (params.result ()); + bool add_state (true); if (rs != "*") { if (rs == "pending") + { q = q && qb::force != "unforced"; + } else if (rs == "building") + { q = q && qb::state == "building"; + add_state = false; + } else { query sq (qb::status == rs); @@ -259,8 +265,12 @@ build_query (const brep::vector* config_ids, // well (rebuild). // q = q && qb::state == "built" && sq; + add_state = false; } } + + if (add_state) + q = q && qb::state != "queued"; } catch (const invalid_argument&) { -- cgit v1.1