diff --git a/cmk/gui/userdb/_user_profile_cleanup.py b/cmk/gui/userdb/_user_profile_cleanup.py index 70693400d49..714a33fcb0a 100644 --- a/cmk/gui/userdb/_user_profile_cleanup.py +++ b/cmk/gui/userdb/_user_profile_cleanup.py @@ -12,7 +12,6 @@ from cmk.gui.background_job import BackgroundJob, BackgroundProcessInterface, InitialStatusArgs from cmk.gui.i18n import _ -from cmk.gui.log import logger as gui_logger from ..logged_in import user from .store import load_users @@ -23,10 +22,6 @@ def execute_user_profile_cleanup_job() -> None: Errors are logged to var/log/web.log.""" job = UserProfileCleanupBackgroundJob() - if job.is_active(): - gui_logger.debug("Job is already running: Skipping this time") - return - job.start( job.do_execute, InitialStatusArgs( diff --git a/cmk/gui/userdb/user_sync_job.py b/cmk/gui/userdb/user_sync_job.py index 2f89c5e83ac..018b9e960c2 100644 --- a/cmk/gui/userdb/user_sync_job.py +++ b/cmk/gui/userdb/user_sync_job.py @@ -32,9 +32,6 @@ def execute_userdb_job() -> None: return job = UserSyncBackgroundJob() - if job.is_active(): - gui_logger.debug("Another synchronization job is already running: Skipping this sync") - return if not job.shall_start(): gui_logger.debug("Job shall not start") diff --git a/cmk/gui/watolib/_sync_remote_sites.py b/cmk/gui/watolib/_sync_remote_sites.py index b5d0b2359c7..53358eb60af 100644 --- a/cmk/gui/watolib/_sync_remote_sites.py +++ b/cmk/gui/watolib/_sync_remote_sites.py @@ -318,9 +318,6 @@ def execute_sync_remote_sites() -> None: return job = SyncRemoteSitesBackgroundJob() - if job.is_active(): - logger.debug("Another 'sync remote sites' job is already running: Skipping this time.") - return if not job.shall_start(): logger.debug("Job shall not start") diff --git a/cmk/gui/watolib/activate_changes.py b/cmk/gui/watolib/activate_changes.py index 19a3666d0f9..c2cc25419e9 100644 --- a/cmk/gui/watolib/activate_changes.py +++ b/cmk/gui/watolib/activate_changes.py @@ -1966,10 +1966,6 @@ def execute_activation_cleanup_background_job(maximum_age: int | None = None) -> else: job = ActivationCleanupBackgroundJob() - if job.is_active(): - logger.debug("Another activation cleanup job is already running: Skipping this time") - return - if not job.shall_start(): logger.debug("Job shall not start") return diff --git a/cmk/gui/watolib/autodiscovery.py b/cmk/gui/watolib/autodiscovery.py index 30e3c37def5..08bb508a7ef 100644 --- a/cmk/gui/watolib/autodiscovery.py +++ b/cmk/gui/watolib/autodiscovery.py @@ -99,10 +99,6 @@ def execute_autodiscovery() -> None: return job = AutodiscoveryBackgroundJob() - if job.is_active(): - logger.debug("Another 'autodiscovery' job is already running: Skipping this time.") - return - job.start( job.do_execute, InitialStatusArgs( diff --git a/cmk/gui/watolib/automatic_host_removal.py b/cmk/gui/watolib/automatic_host_removal.py index 0297a2cc28d..c6fa2f75db4 100644 --- a/cmk/gui/watolib/automatic_host_removal.py +++ b/cmk/gui/watolib/automatic_host_removal.py @@ -44,19 +44,14 @@ def execute_host_removal_background_job() -> None: if is_wato_slave_site(): return - job = HostRemovalBackgroundJob() - if job.is_active(): - _LOGGER.debug("Another host removal job is already running, skipping this time.") - return - if not _load_automatic_host_removal_ruleset(): _LOGGER.debug("Automatic host removal not configured") return - job.start( + HostRemovalBackgroundJob().start( _do_remove_hosts, InitialStatusArgs( - title=job.gui_title(), + title=HostRemovalBackgroundJob.gui_title(), lock_wato=False, stoppable=False, user=str(user.id) if user.id else None,