def interruptable_sleep(sleep_time, atomic_delay=0.1):
    if atomic_delay <= 0:
        raise ValueError("atomic_delay should be > 0")

    if sleep_time >= 0:
        if sleep_time < 1:
            return time.sleep(sleep_time)

        for x in moves.xrange(int(sleep_time / atomic_delay)):
            time.sleep(atomic_delay)

        left = sleep_time - (int(sleep_time / atomic_delay)) * atomic_delay
        if left:
            time.sleep(left)
    else:
        raise ValueError("sleep_time should be >= 0")
Runs the worker.
dataset/ETHPy150Open openstack/rally/rally/common/utils.py/interruptable_sleep--crossover with--dataset/ETHPy150Open openstack/taskflow/taskflow/engines/worker_based/worker.py/Worker.run