From f81bf34e64f987be0c8eb4b4553b4d0e941f38f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Fri, 29 Sep 2023 09:41:32 +0200 Subject: [PATCH 1/2] Fix script manager lock key mysql_framework depends on `redlock`, without any version restriction. However, starting with 2.0.0, `redlock` changed its implementation to use the gem `redis-client`, which does not allow passing in a `Class` type as a locking key. This commit addresses this by using the class name instead. The previous `redis` implementation was calling `#to_s` on the argument, so the end result is the same. --- lib/mysql_framework/scripts/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mysql_framework/scripts/manager.rb b/lib/mysql_framework/scripts/manager.rb index 11f7e9d..e538555 100644 --- a/lib/mysql_framework/scripts/manager.rb +++ b/lib/mysql_framework/scripts/manager.rb @@ -8,7 +8,7 @@ def initialize(mysql_connector) end def execute - lock_manager.with_lock(key: self.class) do + lock_manager.with_lock(key: self.class.name) do initialize_script_history executed_scripts = retrieve_executed_scripts From eaf97fadb51fb5709294f0a1cbea7c7f147356f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Fri, 29 Sep 2023 09:55:43 +0200 Subject: [PATCH 2/2] Bump version --- lib/mysql_framework/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mysql_framework/version.rb b/lib/mysql_framework/version.rb index 991fba2..c876670 100644 --- a/lib/mysql_framework/version.rb +++ b/lib/mysql_framework/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module MysqlFramework - VERSION = '2.1.7' + VERSION = '2.1.8' end