Only update FASP availability if it actually changed (#38818)
This commit is contained in:
1 parent
2b93a2211f
commit
2dd630bc58
2 files changed
+12
-7
No files matched your search
@@ -10,10 +10,12 @@ class Fasp::BaseWorker
|
||||
def with_provider(provider)
|
||||
return unless provider.confirmed? && provider.available?
|
||||
|
||||
yield
|
||||
rescue *Mastodon::HTTP_CONNECTION_ERRORS
|
||||
raise if provider.available?
|
||||
ensure
|
||||
provider.update_availability!
|
||||
begin
|
||||
yield
|
||||
rescue *Mastodon::HTTP_CONNECTION_ERRORS
|
||||
raise if provider.available?
|
||||
ensure
|
||||
provider.update_availability!
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user