コード例 #1
0
ファイル: services.py プロジェクト: majma24/checkmk
    def __init__(self, host_name: str) -> None:
        job_id = "%s-%s" % (self.job_prefix, host_name)
        last_job_status = WatoBackgroundJob(job_id).get_status()

        super(ServiceDiscoveryBackgroundJob, self).__init__(
            job_id,
            title=_("Service discovery"),
            stoppable=True,
            host_name=host_name,
            estimated_duration=last_job_status.get("duration"),
        )
コード例 #2
0
ファイル: host_rename.py プロジェクト: LinuxHaus/checkmk
    def __init__(self, title=None):
        last_job_status = WatoBackgroundJob(self.job_prefix).get_status()
        super().__init__(
            self.job_prefix,
            title=title or self.gui_title(),
            lock_wato=True,
            stoppable=False,
            estimated_duration=last_job_status.get("duration"),
        )

        if self.is_active():
            raise MKGeneralException(
                _("Another renaming operation is currently in progress"))
コード例 #3
0
ファイル: services.py プロジェクト: LinuxHaus/checkmk
    def __init__(self, host_name: str) -> None:
        job_id = "%s-%s" % (self.job_prefix, host_name)
        last_job_status = WatoBackgroundJob(job_id).get_status()

        super().__init__(
            job_id,
            title=_("Service discovery"),
            stoppable=True,
            host_name=host_name,
            estimated_duration=last_job_status.get("duration"),
        )
        self._pre_try_discovery = (
            0,
            TryDiscoveryResult(
                output="",
                check_table=[],
                host_labels={},
                new_labels={},
                vanished_labels={},
                changed_labels={},
            ),
        )