diff --git a/opt/ahenk/base/scheduler/custom/custom_scheduler.py b/opt/ahenk/base/scheduler/custom/custom_scheduler.py index 06cdcb7..1dac2d6 100644 --- a/opt/ahenk/base/scheduler/custom/custom_scheduler.py +++ b/opt/ahenk/base/scheduler/custom/custom_scheduler.py @@ -28,7 +28,7 @@ class CustomScheduler(BaseScheduler): def add_job(self, job): self.events.append(job) - def Tsave_and_add_job(self, task): + def save_and_add_job(self, task): try: self.logger.debug('Saving scheduled task to database...') self.scheduledb.save(task) diff --git a/opt/ahenk/plugins/sample/init.py b/opt/ahenk/plugins/sample/init.py deleted file mode 100644 index a16c8bc..0000000 --- a/opt/ahenk/plugins/sample/init.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Init(AbstractPlugin): - def __init__(self, context): - super(Init, self).__init__() - self.context = context - self.logger = self.get_logger() - - def handle_init_mode(self): - # TODO Do what do you want to do! - pass - - -def handle_mode(context): - init = Init(context) - init.handle_init_mode() diff --git a/opt/ahenk/plugins/sample/login.py b/opt/ahenk/plugins/sample/login.py deleted file mode 100644 index 412178e..0000000 --- a/opt/ahenk/plugins/sample/login.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Login(AbstractPlugin): - def __init__(self, context): - super(Login, self).__init__() - self.context = context - self.username = str(context.get_username()) - self.logger = self.get_logger() - - def handle_login_mode(self): - # TODO Do what do you want to do! - pass - - -def handle_mode(context): - login = Login(context) - login.handle_login_mode() diff --git a/opt/ahenk/plugins/sample/logout.py b/opt/ahenk/plugins/sample/logout.py deleted file mode 100644 index a2437d0..0000000 --- a/opt/ahenk/plugins/sample/logout.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Logout(AbstractPlugin): - def __init__(self, context): - super(Logout, self).__init__() - self.context = context - self.username = str(context.get_username()) - self.logger = self.get_logger() - - def handle_logout_mode(self): - # TODO Do what do you want to do! - pass - - -def handle_mode(context): - logout = Logout(context) - logout.handle_logout_mode() diff --git a/opt/ahenk/plugins/sample/main.py b/opt/ahenk/plugins/sample/main.py deleted file mode 100644 index de4527a..0000000 --- a/opt/ahenk/plugins/sample/main.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -def info(): - return None diff --git a/opt/ahenk/plugins/sample/policy.py b/opt/ahenk/plugins/sample/policy.py deleted file mode 100644 index 56c91da..0000000 --- a/opt/ahenk/plugins/sample/policy.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Sample(AbstractPlugin): - def __init__(self, profile_data, context): - super(Sample, self).__init__() - self.profile_data = profile_data - self.context = context - self.logger = self.get_logger() - - def handle_policy(self): - # TODO Do what do you want to do! - # TODO Don't Forget returning response with - pass - - -def handle_policy(profile_data, context): - print('Sample Plugin Policy') - sample = Sample(profile_data, context) - sample.handle_policy() diff --git a/opt/ahenk/plugins/sample/safe.py b/opt/ahenk/plugins/sample/safe.py deleted file mode 100644 index 2debd2e..0000000 --- a/opt/ahenk/plugins/sample/safe.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Safe(AbstractPlugin): - def __init__(self, context): - super(Safe, self).__init__() - self.context = context - self.username = str(context.get_username()) - self.logger = self.get_logger() - - def handle_safe_mode(self): - # TODO Do what do you want to do! - pass - - -def handle_mode(context): - safe = Safe(context) - safe.handle_safe_mode() diff --git a/opt/ahenk/plugins/sample/shutdown.py b/opt/ahenk/plugins/sample/shutdown.py deleted file mode 100644 index a51766b..0000000 --- a/opt/ahenk/plugins/sample/shutdown.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Shutdown(AbstractPlugin): - def __init__(self, context): - super(Shutdown, self).__init__() - self.context = context - self.logger = self.get_logger() - - def handle_shutdown_mode(self): - # TODO Do what do you want to do! - pass - - -def handle_mode(context): - shutdown = Shutdown(context) - shutdown.handle_shutdown_mode() diff --git a/opt/ahenk/plugins/sample/task_command_id.py b/opt/ahenk/plugins/sample/task_command_id.py deleted file mode 100644 index 50651f7..0000000 --- a/opt/ahenk/plugins/sample/task_command_id.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from base.plugin.abstract_plugin import AbstractPlugin - - -class Sample(AbstractPlugin): - def __init__(self, task, context): - super(Sample, self).__init__() - self.task = task - self.context = context - self.logger = self.get_logger() - - def handle_task(self): - # TODO Do what do you want to do! - # TODO Don't Forget returning response with - pass - - -def handle_task(task, context): - print('Sample Plugin Task') - sample = Sample(task, context) - sample.handle_task()