From fe863aa33ae3dcf31e68a8162110632ab17f44f0 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 15 Jul 2016 14:05:37 -0400 Subject: [PATCH] Rename this state transition handler. --- rida/scheduler/handlers/modules.py | 8 +++++--- .../test_modules/{test_init.py => test_wait.py} | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) rename tests/test_scheduler/test_modules/{test_init.py => test_wait.py} (95%) diff --git a/rida/scheduler/handlers/modules.py b/rida/scheduler/handlers/modules.py index 7c02bd73..f6ba125e 100644 --- a/rida/scheduler/handlers/modules.py +++ b/rida/scheduler/handlers/modules.py @@ -32,12 +32,14 @@ import koji log = logging.getLogger(__name__) -def init(config, session, msg): - """ Called whenever a module enters the 'init' state. +def wait(config, session, msg): + """ Called whenever a module enters the 'wait' state. - We usually transition to this state when the modulebuild is first requested. + We transition to this state shortly after a modulebuild is first requested. All we do here is request preparation of the buildroot. + The kicking off of individual component builds is handled elsewhere, + in rida.schedulers.handlers.repos. """ build = rida.database.ModuleBuild.from_fedmsg(session, msg) pdc_session = rida.pdc.get_pdc_client_session(config) diff --git a/tests/test_scheduler/test_modules/test_init.py b/tests/test_scheduler/test_modules/test_wait.py similarity index 95% rename from tests/test_scheduler/test_modules/test_init.py rename to tests/test_scheduler/test_modules/test_wait.py index bfc8878d..945a0df0 100644 --- a/tests/test_scheduler/test_modules/test_init.py +++ b/tests/test_scheduler/test_modules/test_wait.py @@ -26,12 +26,12 @@ import mock import rida.scheduler.handlers.modules -class TestInit(unittest.TestCase): +class TestWait(unittest.TestCase): def setUp(self): self.config = mock.Mock() self.session = mock.Mock() - self.fn = rida.scheduler.handlers.modules.init + self.fn = rida.scheduler.handlers.modules.wait @mock.patch('rida.builder.KojiModuleBuilder') @mock.patch('rida.database.ModuleBuild.from_fedmsg')