From 3d16bd7fd8a8e6f4c688d4ad57f9269f4c239db4 Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Mon, 11 Aug 2014 08:48:01 +0200 Subject: [PATCH] [IMP] removing 'FOR UPDATE NOWAIT' as ROW EXCLUSIVE lock is already acquired by DELETE and INSERT http://www.postgresql.org/docs/9.2/static/explicit-locking.html --- base_location_geonames_import/wizard/geonames_import.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/base_location_geonames_import/wizard/geonames_import.py b/base_location_geonames_import/wizard/geonames_import.py index e96a1ea59..e74c42204 100644 --- a/base_location_geonames_import/wizard/geonames_import.py +++ b/base_location_geonames_import/wizard/geonames_import.py @@ -86,8 +86,6 @@ class better_zip_geonames_import(models.TransientModel): % (res_request.status_code, url)) bzip_ids_to_delete = bzip_obj.search([('country_id', '=', country_id)]) if bzip_ids_to_delete: - self.env.cr.execute('SELECT id FROM res_better_zip WHERE id in %s ' - 'FOR UPDATE NOWAIT', (tuple(bzip_ids_to_delete), )) bzip_obj.unlink(bzip_ids_to_delete) logger.info( '%d better zip entries deleted for country %s'