diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exceptions.rb | 9 | ||||
-rw-r--r-- | lib/mastodon/media_cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/search_cli.rb | 2 | ||||
-rw-r--r-- | lib/tasks/mastodon.rake | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/lib/exceptions.rb b/lib/exceptions.rb index 0c677b660..3c5ba226b 100644 --- a/lib/exceptions.rb +++ b/lib/exceptions.rb @@ -25,4 +25,13 @@ module Mastodon end end end + + class PrivateNetworkAddressError < HostValidationError + attr_reader :host + + def initialize(host) + @host = host + super() + end + end end diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 4904cc5eb..bba4a1bd7 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -234,7 +234,7 @@ module Mastodon end if options[:days].present? - scope = scope.where('id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false)) + scope = scope.where('media_attachments.id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false)) end processed, aggregate = parallelize_with_progress(scope) do |media_attachment| diff --git a/lib/mastodon/search_cli.rb b/lib/mastodon/search_cli.rb index b579ebc14..b206854ab 100644 --- a/lib/mastodon/search_cli.rb +++ b/lib/mastodon/search_cli.rb @@ -30,7 +30,7 @@ module Mastodon changed since the last run. Index upgrades erase index data. Even if creating or upgrading indices is not necessary, data from the - database will be imported into the indices, unless overriden with --no-import. + database will be imported into the indices, unless overridden with --no-import. LONG_DESC def deploy if options[:concurrency] < 1 diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index d652468b3..0ccfc9f29 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -11,7 +11,7 @@ namespace :mastodon do # When the application code gets loaded, it runs `lib/mastodon/redis_configuration.rb`. # This happens before application environment configuration and sets REDIS_URL etc. # These variables are then used even when REDIS_HOST etc. are changed, so clear them - # out so they don't interfer with our new configuration. + # out so they don't interfere with our new configuration. ENV.delete('REDIS_URL') ENV.delete('CACHE_REDIS_URL') ENV.delete('SIDEKIQ_REDIS_URL') |