def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) self._vm_manager = master.lib.vm.manage.VMManager(on_worker_exited=self._on_worker_exited) for img in master.models.Image.objects(status__name__in=["import", "configure", "create", "delete"]): self._handle_status(img.id, image=img)
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) self._processors = [] for filename in glob.glob( os.path.join(os.path.dirname(__file__), "result_processors", "*.py")): filename_ = os.path.basename(filename) if filename_ == "__init__.py": continue mod_name = filename_.replace(".py", "") mod = __import__("master.watchers.result_processors", globals(), locals(), fromlist=[mod_name]) mod = getattr(mod, mod_name) for item_name in dir(mod): item = getattr(mod, item_name) # we only care about classes if type(item) is not type: continue if issubclass(item, ResultProcessorBase): self._log.info("found result processor: {}".format( item.__name__)) self._processors.append(item())
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) self._job_man = JobManager() # this needs to be continuously running self._job_man.start() for job in master.models.Job.objects(status__name__in=["run", "stop", "cancel"]): self._handle_status(job.id, job=job)
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) self._job_man = JobManager() # this needs to be continuously running self._job_man.start() for job in master.models.Job.objects( status__name__in=["run", "stop", "cancel"]): self._handle_status(job.id, job=job)
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) self._processors = [] for filename in glob.glob(os.path.join(os.path.dirname(__file__), "result_processors", "*.py")): filename_ = os.path.basename(filename) if filename_ == "__init__.py": continue mod_name = filename_.replace(".py", "") mod = __import__("master.watchers.result_processors", globals(), locals(), fromlist=[mod_name]) mod = getattr(mod, mod_name) for item_name in dir(mod): item = getattr(mod, item_name) # we only care about classes if type(item) is not type: continue if issubclass(item, ResultProcessorBase): self._log.info("found result processor: {}".format(item.__name__)) self._processors.append(item())
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) for code in master.models.Code.objects( type__in=["new_tool", "new_component"]): self._handle_new_code(code.id, code=code)
def __init__(self, *args, **kwargs): WatcherBase.__init__(self, *args, **kwargs) for code in master.models.Code.objects(type__in=["new_tool", "new_component"]): self._handle_new_code(code.id, code=code)