1
0
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:
J. Fernando Sánchez 2015-04-26 21:08:36 +02:00
parent a857dd3042
commit 384aba4654
2 changed files with 10 additions and 1 deletions

View File

@ -13,4 +13,5 @@ class SleepPlugin(SenpyPlugin):
sleep(self.timeout)
def analyse(self, *args, **kwargs):
sleep(float(kwargs.get("timeout", self.timeout)))
return Response()

View File

@ -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
}
}
}