mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
7badad7797
* Fix regeneration marker not being removed after completion * Return HTTP 206 from /api/v1/timelines/home if regeneration in progress Prioritize RegenerationWorker by putting it into default queue * Display loading indicator and poll home timeline while it regenerates * Add graphic to regeneration message * Make "not found" indicator consistent with home regeneration
15 lines
303 B
Ruby
15 lines
303 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RegenerationWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options unique: :until_executed
|
|
|
|
def perform(account_id, _ = :home)
|
|
account = Account.find(account_id)
|
|
PrecomputeFeedService.new.call(account)
|
|
rescue ActiveRecord::RecordNotFound
|
|
true
|
|
end
|
|
end
|