Renamed wait plugin to sleep
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
from .abstract_plugin import AbstractCommand, AbstractCommandCompiler, AbstractPlugin
|
||||
from .wait_plugin import WaitPlugin
|
||||
from .sleep_plugin import SleepPlugin
|
||||
from .sync_plugin import SyncPlugin
|
||||
@@ -5,7 +5,7 @@ import logging
|
||||
import time
|
||||
|
||||
|
||||
class WaitCommand(AbstractCommand):
|
||||
class SleepCommand(AbstractCommand):
|
||||
|
||||
def __init__(self, logger: logging.Logger, secs: float):
|
||||
|
||||
@@ -25,31 +25,31 @@ class WaitCommand(AbstractCommand):
|
||||
|
||||
def describe(self) -> dict:
|
||||
return {
|
||||
"command": "wait",
|
||||
"command": "sleep",
|
||||
"params": {
|
||||
"secs": self._secs
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WaitCompiler(AbstractCommandCompiler):
|
||||
class SleepCompiler(AbstractCommandCompiler):
|
||||
|
||||
def __init__(self, logger: logging.Logger):
|
||||
self._logger = logger
|
||||
|
||||
def compile(self, secs: float) -> AbstractCommand:
|
||||
return WaitCommand(self._logger, secs)
|
||||
return SleepCommand(self._logger, secs)
|
||||
|
||||
|
||||
class WaitPlugin(AbstractPlugin):
|
||||
plugin_name = "wait"
|
||||
class SleepPlugin(AbstractPlugin):
|
||||
plugin_name = "sleep"
|
||||
|
||||
def __init__(self):
|
||||
self._logger = logging.getLogger("plugin").getChild("wait")
|
||||
self._logger = logging.getLogger("plugin").getChild("sleep")
|
||||
|
||||
def load_compilers(self) -> Dict[str, AbstractCommandCompiler]:
|
||||
return {
|
||||
"wait": WaitCompiler(self._logger)
|
||||
"sleep": SleepCompiler(self._logger)
|
||||
}
|
||||
|
||||
def close(self):
|
||||
Reference in New Issue
Block a user