mirror of
https://github.com/gsi-upm/senpy
synced 2024-12-22 13:08:13 +00:00
Sleep plugin sleeps on request too
This commit is contained in:
parent
a857dd3042
commit
384aba4654
@ -13,4 +13,5 @@ class SleepPlugin(SenpyPlugin):
|
||||
sleep(self.timeout)
|
||||
|
||||
def analyse(self, *args, **kwargs):
|
||||
sleep(float(kwargs.get("timeout", self.timeout)))
|
||||
return Response()
|
||||
|
@ -4,5 +4,13 @@
|
||||
"description": "I am dummy",
|
||||
"author": "@balkian",
|
||||
"version": "0.1",
|
||||
"timeout": "2"
|
||||
"timeout": "2",
|
||||
"extra_params": {
|
||||
"timeout": {
|
||||
"@id": "timeout_sleep",
|
||||
"aliases": ["timeout", "to"],
|
||||
"required": false,
|
||||
"default": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user