Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nightpool committed Mar 18, 2024
1 parent 329d603 commit c6e5329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/models/status.rb
Expand Up @@ -315,8 +315,10 @@ def trendable?
end

def schedule_removal
return if Sidekiq::Testing.inline?

moon = Lunartic.today
removal_delay = (moon.percent_full * 220 + 20)
removal_delay = (moon.percent_full * 220) + 20
RemovalWorker.perform_in(removal_delay.minutes, id)
end
after_create :schedule_removal

Check failure on line 324 in app/models/status.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Rails/ActiveRecordCallbacksOrder: after_create is supposed to appear before before_destroy. (https://rails.rubystyle.guide/#callbacks-order)
Expand Down
2 changes: 1 addition & 1 deletion lib/mastodon/redis_config.rb
Expand Up @@ -26,7 +26,7 @@ def setup_redis_env_url(prefix = nil, defaults = true)
setup_redis_env_url(:cache, false)
setup_redis_env_url(:sidekiq, false)

namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
namespace = ENV.fetch('REDIS_NAMESPACE', nil)
cache_namespace = [namespace, 'cache', `git rev-parse --short HEAD`].compact.join('_')
sidekiq_namespace = namespace

Expand Down

0 comments on commit c6e5329

Please sign in to comment.