about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/cli_helper.rb16
-rw-r--r--lib/mastodon/version.rb2
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/mastodon/cli_helper.rb b/lib/mastodon/cli_helper.rb
index 8704edd75..ab1351ae8 100644
--- a/lib/mastodon/cli_helper.rb
+++ b/lib/mastodon/cli_helper.rb
@@ -52,14 +52,16 @@ module Mastodon
 
             progress.log("Processing #{item.id}") if options[:verbose]
 
-            result = ActiveRecord::Base.connection_pool.with_connection do
-              yield(item)
-            ensure
-              RedisConfiguration.pool.checkin if Thread.current[:redis]
-              Thread.current[:redis] = nil
+            Chewy.strategy(:mastodon) do
+              result = ActiveRecord::Base.connection_pool.with_connection do
+                yield(item)
+              ensure
+                RedisConfiguration.pool.checkin if Thread.current[:redis]
+                Thread.current[:redis] = nil
+              end
+
+              aggregate.increment(result) if result.is_a?(Integer)
             end
-
-            aggregate.increment(result) if result.is_a?(Integer)
           rescue => e
             progress.log pastel.red("Error processing #{item.id}: #{e}")
           ensure
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 3ec546fa2..b98095fa3 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -13,7 +13,7 @@ module Mastodon
     end
 
     def patch
-      0
+      1
     end
 
     def flags