mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 13:32:22 +03:00
function names fixed according to PEP 8 standards
This commit is contained in:
parent
80beb37e08
commit
1e35065b95
5 changed files with 9 additions and 8 deletions
|
@ -101,7 +101,7 @@ class ExecutionManager(object):
|
|||
except Exception as e:
|
||||
self.logger.error('[ExecutionManager] Could not remove temp file. Error Message: {}'.format(str(e)))
|
||||
|
||||
self.plugin_manager.loadSinglePlugin(plugin_name)
|
||||
self.plugin_manager.load_single_plugin(plugin_name)
|
||||
|
||||
except Exception as e:
|
||||
self.logger.error('[ExecutionManager] A problem occurred while installing new Ahenk plugin. Error Message:{}'.format(str(e)))
|
||||
|
|
|
@ -70,7 +70,7 @@ class Plugin(threading.Thread):
|
|||
|
||||
if obj_name == "TASK":
|
||||
self.logger.debug('[Plugin] Executing task')
|
||||
command = Scope.getInstance().getPluginManager().findCommand(self.getName(), item_obj.get_command_cls_id().lower())
|
||||
command = Scope.getInstance().getPluginManager().find_command(self.getName(), item_obj.get_command_cls_id().lower())
|
||||
self.context.put('task_id', item_obj.get_command_cls_id().lower())
|
||||
|
||||
task_data = item_obj.get_parameter_map()
|
||||
|
@ -112,7 +112,7 @@ class Plugin(threading.Thread):
|
|||
|
||||
self.logger.debug('[Plugin] Executing profile')
|
||||
profile_data = item_obj.get_profile_data()
|
||||
policy_module = Scope.getInstance().getPluginManager().findPolicyModule(item_obj.get_plugin().get_name())
|
||||
policy_module = Scope.getInstance().getPluginManager().find_policy_module(item_obj.get_plugin().get_name())
|
||||
self.context.put('username', item_obj.get_username())
|
||||
|
||||
execution_id = self.get_execution_id(item_obj.get_id())
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
from base.plugin.plugin_manager import PluginManager
|
||||
|
||||
class PluginManagerFactory(object):
|
||||
|
||||
class PluginManagerFactory(object):
|
||||
def get_instance():
|
||||
return PluginManager()
|
||||
|
||||
get_instance = staticmethod(get_instance)
|
|
@ -30,7 +30,7 @@ class ScheduleTaskJob(object):
|
|||
def process_task(self):
|
||||
try:
|
||||
self.logger.debug('[ScheduleTaskJob] Running scheduled task now...')
|
||||
self.plugin_manager.processTask(self.task)
|
||||
self.plugin_manager.process_task(self.task)
|
||||
self.logger.debug('[ScheduleTaskJob] Scheduled Task was executed.')
|
||||
if self.is_single_shot():
|
||||
Scope.getInstance().get_scheduler().remove_job(self.task.get_id())
|
||||
|
|
|
@ -23,7 +23,7 @@ class TaskManager(object):
|
|||
self.saveTask(task)
|
||||
if task.get_cron_str() is None or task.get_cron_str() == '':
|
||||
self.logger.debug('[TaskManager] Adding task ... ')
|
||||
self.pluginManager.processTask(task)
|
||||
self.pluginManager.process_task(task)
|
||||
else:
|
||||
self.scheduler.save_and_add_job(task)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class TaskManager(object):
|
|||
|
||||
def addPolicy(self, policy):
|
||||
try:
|
||||
self.pluginManager.processPolicy(policy)
|
||||
self.pluginManager.process_policy(policy)
|
||||
except Exception as e:
|
||||
self.logger.error("[TaskManager] Exception occurred when adding policy. Error Message: {}".format(str(e)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue