Merge remote-tracking branch 'parent/main' into upstream-20240716
This commit is contained in:
commit
adee1645a3
203 changed files with 1707 additions and 1067 deletions
|
@ -5,6 +5,23 @@ require_relative '../../lib/mastodon/sidekiq_middleware'
|
|||
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
|
||||
ready_filename = ENV.fetch('MASTODON_SIDEKIQ_READY_FILENAME', nil)
|
||||
if ready_filename
|
||||
raise 'MASTODON_SIDEKIQ_READY_FILENAME is not a valid filename' if File.basename(ready_filename) != ready_filename
|
||||
|
||||
ready_path = Rails.root.join('tmp', ready_filename)
|
||||
|
||||
config.on(:startup) do
|
||||
FileUtils.touch(ready_path)
|
||||
end
|
||||
|
||||
config.on(:shutdown) do
|
||||
FileUtils.rm_f(ready_path)
|
||||
end
|
||||
end
|
||||
|
||||
config.server_middleware do |chain|
|
||||
chain.add Mastodon::SidekiqMiddleware
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue