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.
Signed-off-by: Michael Wood <[email protected]> --- bitbake/lib/toaster/orm/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index a7de57c..6b00916 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1741,8 +1741,12 @@ def invalidate_cache(**kwargs): def signal_runbuilds(): """Send SIGUSR1 to runbuilds process""" - with open(os.path.join(os.getenv('BUILDDIR'), '.runbuilds.pid')) as pidf: - os.kill(int(pidf.read()), SIGUSR1) + try: + with open(os.path.join(os.getenv('BUILDDIR'), + '.runbuilds.pid')) as pidf: + os.kill(int(pidf.read()), SIGUSR1) + except FileNotFoundError: + logger.info("Run builds doesn't appear to be running yet") django.db.models.signals.post_save.connect(invalidate_cache) django.db.models.signals.post_delete.connect(invalidate_cache) -- 2.7.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
