Only update FASP availability if it actually changed (#38818)

This commit is contained in:
David Roetzel authored and GitHub committed 2026-04-27 13:15:53 +00:00
1 parent 2b93a2211f
commit 2dd630bc58
2 files changed
+12 -7

No files matched your search

+7 -5
View File
@@ -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