mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix async refresh never being finished when status cannot be fetched (#35500)
This commit is contained in:
parent
d121007927
commit
8cf7a77808
8 changed files with 26 additions and 30 deletions
|
|
@ -42,14 +42,6 @@ RSpec.describe WorkerBatch do
|
|||
it 'does not persist the job IDs' do
|
||||
expect(subject.jobs).to eq []
|
||||
end
|
||||
|
||||
context 'when async refresh is connected' do
|
||||
let(:async_refresh) { AsyncRefresh.new(async_refresh_key) }
|
||||
|
||||
it 'immediately marks the async refresh as finished' do
|
||||
expect(async_refresh.reload.finished?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when called with an array of job IDs' do
|
||||
|
|
@ -71,7 +63,7 @@ RSpec.describe WorkerBatch do
|
|||
before do
|
||||
subject.connect(async_refresh_key, threshold: 0.5) if async_refresh.present?
|
||||
subject.add_jobs(%w(foo bar baz))
|
||||
subject.remove_job('foo')
|
||||
subject.remove_job('foo', increment: true)
|
||||
end
|
||||
|
||||
it 'removes the job from pending jobs' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue