Example #1
0
    def get_domain_object(self):
        if not self._job:
            self._job = get_job(slug=self.slug)(model=self)
            if not self._job:
                raise ValueError(u"Job %s cannot be resolved" % self.slug)

        return self._job
Example #2
0
 def auto_discovery(self):
     job = get_job(self.slug)()
     for command in job.get_commands():
         Command.objects.get_or_create(slug=command.identifier)
Example #3
0
 def test_debian_package_creator_discovered(self):
     # aka basic discovering
     job = get_job('cthulhubot-debian-package-creation')
     self.assert_true(job is not None)