aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorTeddy Wing2017-11-29 17:39:44 +0100
committerTeddy Wing2017-11-29 17:39:44 +0100
commite06f5641a074eacce3218f277b42ef5f1eb696a6 (patch)
tree3d038cd416cb55718dfc9012899de571f7113ff2 /app/models
parente90f92707abf1b2ba4d00f97e15888f6e29e8cbc (diff)
downloadchouette-core-e06f5641a074eacce3218f277b42ef5f1eb696a6.tar.bz2
Referential#lock_table: Add comment about unlock
Refs #5024
Diffstat (limited to 'app/models')
-rw-r--r--app/models/referential.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb
index f78b4ec9a..9047cc21e 100644
--- a/app/models/referential.rb
+++ b/app/models/referential.rb
@@ -378,6 +378,8 @@ class Referential < ActiveRecord::Base
private
def lock_table
+ # No explicit unlock is needed as it will be released at the end of the
+ # transaction.
ActiveRecord::Base.connection.execute(
'LOCK referentials IN ACCESS EXCLUSIVE MODE'
)