Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Essem 2024-07-10 09:41:37 -05:00
commit 4aa2f92bef
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
125 changed files with 706 additions and 243 deletions

View file

@ -2,9 +2,21 @@
require_relative '../../lib/mastodon/sidekiq_middleware'
SIDEKIQ_WILL_PROCESSES_JOBS_FILE = Rails.root.join('tmp', 'sidekiq_process_has_started_and_will_begin_processing_jobs').freeze
Sidekiq.configure_server do |config|
config.redis = REDIS_SIDEKIQ_PARAMS
# This is used in Kubernetes setups, to signal that the Sidekiq process has started and will begin processing jobs
# This comes from https://github.com/sidekiq/sidekiq/wiki/Kubernetes#sidekiq
config.on(:startup) do
FileUtils.touch(SIDEKIQ_WILL_PROCESSES_JOBS_FILE)
end
config.on(:shutdown) do
FileUtils.rm_f(SIDEKIQ_WILL_PROCESSES_JOBS_FILE)
end
config.server_middleware do |chain|
chain.add Mastodon::SidekiqMiddleware
end

View file

@ -5,7 +5,7 @@ Rails.application.configure do
# You should only generate this once per instance. If you later decide to change it, all push subscription will
# be invalidated, requiring the users to access the website again to resubscribe.
#
# Generate with `rake mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web rake mastodon:webpush:generate_vapid_key` if you use docker compose)
# Generate with `bundle exec rails mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web bundle exec rails mastodon:webpush:generate_vapid_key` if you use docker compose)
#
# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html