You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using TaskSet._sleep() is exactly the same as calling gevent.sleep() which is the same as calling time.sleep() (since it's been monkey patched by gevent). Actually I think we could consider removing _sleep() and instead calling gevent.sleep() directly.
My particular use case for this was I wanted to sleep while within a task because some endpoints I'm testing give a retry-after header. It seems like just calling self._sleep() (or even gevent.sleep()) accomplishes exactly what I'm looking for.
Maybe this case is atypical, but also I don't see a problem making it a public part of the API.
It would be much better just to remove the underscore, I am calling it a bit from my tasksets, not sure why it's even private.
The text was updated successfully, but these errors were encountered: