def __init__(self, name, upstream, builderNames, properties={}): base.BaseScheduler.__init__(self, name, builderNames, properties) assert base.isScheduler(upstream), \ "upstream must be another Scheduler instance" self.upstream_name = upstream.name self._buildset_addition_subscr = None self._buildset_completion_subscr = None # the subscription lock makes sure that we're done inserting a # subcription into the DB before registering that the buildset is # complete. self._subscription_lock = defer.DeferredLock()
def test_isScheduler(self): self.assertFalse(base.isScheduler(self)) self.assertTrue(base.isScheduler(self.Subclass()))