Commit 384aba46 authored by J. Fernando Sánchez's avatar J. Fernando Sánchez
Browse files

Sleep plugin sleeps on request too

parent a857dd30
...@@ -13,4 +13,5 @@ class SleepPlugin(SenpyPlugin): ...@@ -13,4 +13,5 @@ class SleepPlugin(SenpyPlugin):
sleep(self.timeout) sleep(self.timeout)
def analyse(self, *args, **kwargs): def analyse(self, *args, **kwargs):
sleep(float(kwargs.get("timeout", self.timeout)))
return Response() return Response()
...@@ -4,5 +4,13 @@ ...@@ -4,5 +4,13 @@
"description": "I am dummy", "description": "I am dummy",
"author": "@balkian", "author": "@balkian",
"version": "0.1", "version": "0.1",
"timeout": "2" "timeout": "2",
"extra_params": {
"timeout": {
"@id": "timeout_sleep",
"aliases": ["timeout", "to"],
"required": false,
"default": 0
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment