summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r--bitbake/lib/toaster/orm/models.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 8ee0c87376..38d014a7f8 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -33,9 +33,10 @@ from django.conf import settings
33import django.db.models.signals 33import django.db.models.signals
34 34
35import sys 35import sys
36import os.path 36import os
37import re 37import re
38import itertools 38import itertools
39from signal import SIGUSR1
39 40
40import logging 41import logging
41logger = logging.getLogger("toaster") 42logger = logging.getLogger("toaster")
@@ -1736,6 +1737,11 @@ def invalidate_cache(**kwargs):
1736 except Exception as e: 1737 except Exception as e:
1737 logger.warning("Problem with cache backend: Failed to clear cache: %s" % e) 1738 logger.warning("Problem with cache backend: Failed to clear cache: %s" % e)
1738 1739
1740def signal_runbuilds():
1741 """Send SIGUSR1 to runbuilds process"""
1742 with open(os.path.join(os.getenv('BUILDDIR'), '.runbuilds.pid')) as pidf:
1743 os.kill(int(pidf.read()), SIGUSR1)
1744
1739django.db.models.signals.post_save.connect(invalidate_cache) 1745django.db.models.signals.post_save.connect(invalidate_cache)
1740django.db.models.signals.post_delete.connect(invalidate_cache) 1746django.db.models.signals.post_delete.connect(invalidate_cache)
1741django.db.models.signals.m2m_changed.connect(invalidate_cache) 1747django.db.models.signals.m2m_changed.connect(invalidate_cache)