From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH v3 2/8] Toaster: Update orm.models to catch error ProcessLookupError
Date: Thu, 9 Nov 2023 16:55:39 +0100 [thread overview]
Message-ID: <20231109155545.130758-2-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231109155545.130758-1-alassane.yattara@savoirfairelinux.com>
- catch error ProcessLookupError and logs it
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
lib/toaster/orm/models.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 0d503a51..1098ad3f 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1389,9 +1389,6 @@ class Machine(models.Model):
return "Machine " + self.name + "(" + self.description + ")"
-
-
-
class BitbakeVersion(models.Model):
name = models.CharField(max_length=32, unique = True)
@@ -1853,6 +1850,8 @@ def signal_runbuilds():
os.kill(int(pidf.read()), SIGUSR1)
except FileNotFoundError:
logger.info("Stopping existing runbuilds: no current process found")
+ except ProcessLookupError:
+ logger.warning("Stopping existing runbuilds: process lookup not found")
class Distro(models.Model):
search_allowed_fields = ["name", "description", "layer_version__layer__name"]
--
2.34.1
next prev parent reply other threads:[~2023-11-09 15:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 15:55 [PATCH v3 1/8] Toaster: Update toaster-requirements.txt to add pytest and some plugin's Alassane Yattara
2023-11-09 15:55 ` Alassane Yattara [this message]
2023-11-09 15:55 ` [PATCH v3 3/8] Toaster: Bug-fix pytest and Failed: Database access not allowed Alassane Yattara
2023-11-09 15:55 ` [PATCH v3 4/8] Toaster: fixed pytest error: Database access not allowed, use the "django_db" Alassane Yattara
2023-11-09 15:55 ` [PATCH v3 5/8] Toaster: Bug-fix django.db.utils.IntegrityError: Problem installing fixture Alassane Yattara
2023-11-09 15:55 ` [PATCH v3 6/8] Toaster: Move toaster tests requirements in bitbake/lib/toaster/toaster-tests-requirements Alassane Yattara
2023-11-09 16:29 ` [Toaster] " Richard Purdie
2023-11-09 15:55 ` [PATCH v3 7/8] Toaster: fixed: Tests fail when executed one after the other out of sequence Alassane Yattara
2023-11-09 15:55 ` [PATCH v3 8/8] Toaster: Added pytest.ini file Alassane Yattara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231109155545.130758-2-alassane.yattara@savoirfairelinux.com \
--to=alassane.yattara@savoirfairelinux.com \
--cc=toaster@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).