Exemplo n.º 1
0
    def get_modules(self, job, **jobargs):
        from disco.worker.modutil import find_modules

        def get(key, default=None):
            return self.getitem(key, job, jobargs, default)

        return find_modules([obj for g, s in get("pipeline", []) for obj in s._callables()], exclude=["Task"])
Exemplo n.º 2
0
 def get_modules(self, job, **jobargs):
     from disco.worker.modutil import find_modules
     def get(key, default=None):
         return self.getitem(key, job, jobargs, default)
     return find_modules([obj
                          for g, s in get('pipeline', [])
                          for obj in s._callables()],
                         exclude=['Task'])
Exemplo n.º 3
0
 def get_modules(self, job, **jobargs):
     from disco.worker.modutil import find_modules
     from disco.util import iterify
     def get(key):
         return self.getitem(key, job, jobargs)
     return find_modules([obj
                          for key in self
                          for obj in iterify(get(key))
                          if callable(obj)],
                         exclude=['Task'])
Exemplo n.º 4
0
    def get_modules(self, job, **jobargs):
        from disco.worker.modutil import find_modules
        from disco.util import iterify
        def get(key):
            return self.getitem(key, job, jobargs)
        from inspect import getsourcefile, getmodule
        job_path = getsourcefile(getmodule(job))

        return find_modules([obj
                             for key in self
                             for obj in iterify(get(key))
                             if callable(obj)],
                             job_path=job_path,
                            exclude=['Task'])