summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/orm/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index a7de57c256..9a4db1e856 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1741,8 +1741,12 @@ def invalidate_cache(**kwargs):
1741 1741
1742def signal_runbuilds(): 1742def signal_runbuilds():
1743 """Send SIGUSR1 to runbuilds process""" 1743 """Send SIGUSR1 to runbuilds process"""
1744 with open(os.path.join(os.getenv('BUILDDIR'), '.runbuilds.pid')) as pidf: 1744 try:
1745 os.kill(int(pidf.read()), SIGUSR1) 1745 with open(os.path.join(os.getenv('BUILDDIR'),
1746 '.runbuilds.pid')) as pidf:
1747 os.kill(int(pidf.read()), SIGUSR1)
1748 except FileNotFoundError:
1749 logger.info("Stopping existing runbuilds: no current process found")
1746 1750
1747django.db.models.signals.post_save.connect(invalidate_cache) 1751django.db.models.signals.post_save.connect(invalidate_cache)
1748django.db.models.signals.post_delete.connect(invalidate_cache) 1752django.db.models.signals.post_delete.connect(invalidate_cache)