Experimental Async Refreshes API (#34918)
This commit is contained in:
parent
825312d4b0
commit
319fbbbfac
11 changed files with 437 additions and 13 deletions
11
app/controllers/concerns/async_refreshes_concern.rb
Normal file
11
app/controllers/concerns/async_refreshes_concern.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module AsyncRefreshesConcern
|
||||
private
|
||||
|
||||
def add_async_refresh_header(async_refresh, retry_seconds: 3)
|
||||
return unless async_refresh.running?
|
||||
|
||||
response.headers['Mastodon-Async-Refresh'] = "id=\"#{async_refresh.id}\", retry=#{retry_seconds}"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue