<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Ok, thanks Josh. We switched to tenacity and it works very well for us )</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">Renat Akhmerov<br style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" />
@Nokia</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On 23 Sep 2017, 11:51 +0700, Joshua Harlow <harlowja@fastmail.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">Hi Renat,<br />
<br />
I was more just saying that depending on your situation it might be<br />
better to switch to using tenacity (not that the retry decorator is<br />
deprecated, though I wouldn't personally use it).<br />
<br />
As you mentioned in<br />
https://bugs.launchpad.net/oslo.service/+bug/1718635/comments/1 this<br />
class and decorator is not thread safe so if that is a concern for you<br />
then that is also better in tenacity.<br />
<br />
I think a lot of usage of that decorator though is like the following:<br />
<br />
def main_func():<br />
<br />
@loopingcall.RetryDecorator<br />
def inner_func():<br />
<do something that may need retries<br />
<br />
<do something<br />
inner_func()<br />
<do more something<br />
<br />
So likely thread-safety was never a concern, though I can't quite say...<br />
I think (but I might be wrong) when that class/code was being proposed I<br />
recommended just using 'retrying' (the precursor to tenacity) but<br />
bygones be bygones...<br />
<br />
Renat Akhmerov wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">Thanks Josh,<br />
<br />
I’m not sure I fully understand your point though. You mean it’s a<br />
legacy (deprecated?) code that we should never use in our code? Should<br />
it be considered a private class of oslo_service?<br />
<br />
In our global requirements tenacity is configured as "tenacity>=3.2.1”,<br />
should we bump it to 4.4.0?<br />
<br />
Renat Akhmerov<br />
@Nokia<br />
<br />
On 21 Sep 2017, 22:42 +0700, Joshua Harlow <harlowja@fastmail.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">It does look like is sort of a bug,<br />
<br />
Though in all honesty I wouldn't be using oslo.service or that looping<br />
code in the future for doing retrying...<br />
<br />
https://pypi.python.org/pypi/tenacity is a much better library with more<br />
`natural` syntax and works more as one would expect (even under threaded<br />
situations).<br />
<br />
If I could of I would of never let 'loopingcall.py' become a file that<br />
exists, but the past is the past, ha.<br />
<br />
Renat Akhmerov wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">Hi Oslo team,<br />
<br />
Can you please check the bug [1]?<br />
<br />
There may be a problem with how looping.RetryDecorator works. Just<br />
stumbled on it in Mistral. Not sure if it’s really a bug or made by<br />
design. If it’s by design then maybe we need to have more accurate<br />
documentation for it.<br />
<br />
FYI: We use this decorator in Mistral and it’s also used in Nova, [2].<br />
<br />
[1] https://bugs.launchpad.net/oslo.service/+bug/1718635<br />
[2]<br />
http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/disk/mount/api.py<br />
<br />
Thanks<br />
<br />
Renat Akhmerov<br />
@Nokia<br />
<br />
__________________________________________________________________________<br />
OpenStack Development Mailing List (not for usage questions)<br />
Unsubscribe:<br />
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br />
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br /></blockquote>
<br />
__________________________________________________________________________<br />
OpenStack Development Mailing List (not for usage questions)<br />
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br />
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br /></blockquote>
__________________________________________________________________________<br />
OpenStack Development Mailing List (not for usage questions)<br />
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br />
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br /></blockquote>
<br />
__________________________________________________________________________<br />
OpenStack Development Mailing List (not for usage questions)<br />
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br />
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br /></blockquote>
</div>
</body>
</html>