gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.78k stars 163 forks source link

Enable gaplock protection when using trilogy mysql adapter #528

Closed jurre closed 10 months ago

jurre commented 11 months ago

In https://github.com/gocardless/statesman/pull/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.