add copy to ZonedPluginRegistry
This commit is contained in:
@@ -8,7 +8,7 @@ from src.zonedpluginregistry import ZonedPluginRegistry
|
||||
|
||||
|
||||
class PluginRegistry():
|
||||
plugins = ZonedPluginRegistry({})
|
||||
plugins = ZonedPluginRegistry()
|
||||
|
||||
@staticmethod
|
||||
def load_plugin(plugin_name: str):
|
||||
@@ -22,6 +22,10 @@ class PluginRegistry():
|
||||
return
|
||||
raise RuntimeError("plugin %s not found" % plugin_name)
|
||||
|
||||
@staticmethod
|
||||
def create_zoned_plugin_registry():
|
||||
return PluginRegistry.plugins.copy()
|
||||
|
||||
@staticmethod
|
||||
def execute_single(function_name: str, *args) -> Optional[any]:
|
||||
return PluginRegistry.plugins.execute_single(function_name, *args)
|
||||
@@ -29,3 +33,7 @@ class PluginRegistry():
|
||||
@staticmethod
|
||||
def execute(function_name: str, *args) -> [any]:
|
||||
return PluginRegistry.plugins.execute(function_name, *args)
|
||||
|
||||
@staticmethod
|
||||
def execute_flat_map(function_name: str, *args) -> [any]:
|
||||
return PluginRegistry.plugins.execute_flat_map(function_name, *args)
|
||||
|
||||
Reference in New Issue
Block a user