diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-10-28 18:48:47 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-04 12:50:55 +0000 |
commit | 8e70fa1d7933f36244badb34c28ab67f8f159d74 (patch) | |
tree | 2b062adc86cab57c73d6b9436abe000699a2b829 /bitbake/lib/toaster | |
parent | 0c91a400e7341d1cbfd7950067ca5c15a7b38691 (diff) | |
download | poky-8e70fa1d7933f36244badb34c28ab67f8f159d74.tar.gz |
bitbake: toaster: orm models Handle run builds process not yet running
During tests we may want to call the runbuilds process manually for
example when doing a "one shot" approach rather than a long running
process during tests.
(Bitbake rev: 60d3f93836da5523705b0b2e25567d1c9040ec89)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 8 |
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 | ||
1742 | def signal_runbuilds(): | 1742 | def 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 | ||
1747 | django.db.models.signals.post_save.connect(invalidate_cache) | 1751 | django.db.models.signals.post_save.connect(invalidate_cache) |
1748 | django.db.models.signals.post_delete.connect(invalidate_cache) | 1752 | django.db.models.signals.post_delete.connect(invalidate_cache) |