Skip to content

Commit

Permalink
Enable gaplock protection when using trilogy mysql adapter
Browse files Browse the repository at this point in the history
In gocardless#522 the ability to
enable gaplock protection manually was removed, likely assuming there
was no need for this since it's enabled by default when using an adapter
that is named `mysql*`, however we use
https://github.com/trilogy-libraries/trilogy which has been gaining some
traction in the community and this change now leaves us without a way to
enable the functionality.

I think it makes most sense to enable the functionality by default when
using this new adapter as well, and keep config requirements minimal, so
I added a little check for that adapter name as well.
  • Loading branch information
jurre committed Dec 21, 2023
1 parent bb28d45 commit 9c7df62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/statesman/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def mysql_adapter?(adapter_class)
adapter_name = adapter_name(adapter_class)
return false unless adapter_name

adapter_name.downcase.start_with?("mysql")
adapter_name.downcase.start_with?("mysql", "trilogy")
end

def adapter_name(adapter_class)
Expand Down

0 comments on commit 9c7df62

Please sign in to comment.