@@ -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)
@@ -1838,6 +1835,7 @@ class LogMessage(models.Model):
def __str__(self):
return force_bytes('%s %s %s' % (self.get_level_display(), self.message, self.build))
+
def invalidate_cache(**kwargs):
from django.core.cache import cache
try:
@@ -1845,6 +1843,7 @@ def invalidate_cache(**kwargs):
except Exception as e:
logger.warning("Problem with cache backend: Failed to clear cache: %s" % e)
+
def signal_runbuilds():
"""Send SIGUSR1 to runbuilds process"""
try:
@@ -1853,6 +1852,9 @@ def signal_runbuilds():
os.kill(int(pidf.read()), SIGUSR1)
except FileNotFoundError:
logger.info("Stopping existing runbuilds: no current process found")
+ except ProcessLookupError:
+ pass
+
class Distro(models.Model):
search_allowed_fields = ["name", "description", "layer_version__layer__name"]
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> --- lib/toaster/orm/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)