ceph/qa/tasks/waiter.py
Leonid Usov 7773c5db63 qa/tasks: the quiescer task and a waiter task to test it
Fixes: https://tracker.ceph.com/issues/63669
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
2024-04-30 00:03:53 +03:00

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)