mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
7773c5db63
Fixes: https://tracker.ceph.com/issues/63669 Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
13 lines
229 B
Python
13 lines
229 B
Python
|
|
import contextlib
|
|
import gevent
|
|
|
|
@contextlib.contextmanager
|
|
def task(ctx, config):
|
|
on_enter = config.get("on_enter", 0)
|
|
on_exit = config.get("on_exit", 0)
|
|
|
|
gevent.sleep(on_enter)
|
|
yield
|
|
gevent.sleep(on_exit)
|
|
|