Skip to content

Commit

Permalink
Test having no file lock
Browse files Browse the repository at this point in the history
  • Loading branch information
brendon committed Mar 12, 2024
1 parent cb46b21 commit 78c12b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/positioning/advisory_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def initialize(base_class, column)
),
"SQLite" => Adapter.new(
initialise: -> {
FileUtils.mkdir_p "#{Dir.pwd}/tmp"
filename = "#{Dir.pwd}/tmp/#{lock_name}.lock"
@file ||= File.open filename, File::RDWR | File::CREAT, 0o644
# FileUtils.mkdir_p "#{Dir.pwd}/tmp"
# filename = "#{Dir.pwd}/tmp/#{lock_name}.lock"
# @file ||= File.open filename, File::RDWR | File::CREAT, 0o644
},
aquire: -> {
@file.flock File::LOCK_EX
# @file.flock File::LOCK_EX
},
release: -> {
@file.flock File::LOCK_UN
# @file.flock File::LOCK_UN
}
)
}
Expand Down

0 comments on commit 78c12b9

Please sign in to comment.