2014-12-01 17:27:20 +00:00
|
|
|
from senpy.plugins import SenpyPlugin
|
2015-02-23 01:13:31 +00:00
|
|
|
from senpy.models import Response
|
2014-12-01 17:27:20 +00:00
|
|
|
from time import sleep
|
|
|
|
|
2015-02-24 06:15:25 +00:00
|
|
|
|
2014-12-01 17:27:20 +00:00
|
|
|
class SleepPlugin(SenpyPlugin):
|
2015-02-24 06:15:25 +00:00
|
|
|
|
2014-12-01 17:27:20 +00:00
|
|
|
def __init__(self, info, *args, **kwargs):
|
|
|
|
super(SleepPlugin, self).__init__(info, *args, **kwargs)
|
|
|
|
self.timeout = int(info["timeout"])
|
|
|
|
|
|
|
|
def activate(self, *args, **kwargs):
|
|
|
|
sleep(self.timeout)
|
2015-02-23 01:13:31 +00:00
|
|
|
|
|
|
|
def analyse(self, *args, **kwargs):
|
|
|
|
return Response()
|