You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
599 B

# Copyright (C) 2005-2024 Splunk Inc. All Rights Reserved.
from migration.supervisor import MigrationSupervisor
from itsi_py3 import _
def skip_run_during_migration(do_run_func):
"""
Decorator to be applied to ModularInput's do_run()
This will check for active migration in progress, and if migration is in progress
we won't execute mod input code
"""
def wrapper(self, *args, **kwargs):
# TODO: as of 4.6.0 we won't block even if migration is running, that function is reserved for future use
return do_run_func(self, *args, **kwargs)
return wrapper