-
-
Notifications
You must be signed in to change notification settings - Fork 442
Rename try_advisory_lock to advisory_lock_or_retry #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
As discussed in #139 /cc @lmignon @pedrobaeza @damdam-s |
You should change tests accordingly the rename: 2015-11-03 07:42:01,583 22882 ERROR openerp_test openerp.addons.connector.tests.test_connector: File "/home/travis/build/OCA/connector/connector/tests/test_connector.py", line 229, in test_concurrent_import_lock
2015-11-03 07:42:01,583 22882 ERROR openerp_test openerp.addons.connector.tests.test_connector: with connector_unit.try_advisory_lock(lock):
2015-11-03 07:42:01,583 22882 ERROR openerp_test openerp.addons.connector.tests.test_connector: ` AttributeError: 'ConnectorUnit' object has no attribute 'try_advisory_lock' |
a267288
to
7745e8b
Compare
This is what happen when I code before being totally awake, and you caught it even before I could realize :-D |
It is no longer a context manager, because we would expect the lock to be released at the end of the 'with' statement but it lasts until the end of the transaction.
7745e8b
to
15e0e45
Compare
👍 Thank you for the changes. |
Thanks 👍 |
👍 |
Rename try_advisory_lock to advisory_lock_or_retry
It uses the new OCA/connector#138, OCA/connector#139 feature.
It uses the new OCA/connector#138, OCA/connector#139 feature.
It uses the new OCA/connector#138, OCA/connector#139 feature.
It uses the new OCA/connector#138, OCA/connector#139 feature.
It uses the new OCA/connector#138, OCA/connector#139 feature.
It uses the new OCA/connector#138, OCA/connector#139 feature.
It is no longer a context manager, because we would expect the lock to be
released at the end of the 'with' statement but it lasts until the end of the
transaction.