Commit Graph

13 Commits (ce7c0def88b4f9ee97913002fb2d41d1832bd8af)

Author SHA1 Message Date
Eugen Rochko 657496b5a9 Do not cancel PuSH subscriptions after encountering "permanent" error… ()
* Do not cancel PuSH subscriptions after encountering "permanent" error response

After talking with MMN about it, turns out some servers/php setups do
return 4xx errors while rebooting, so this anti-feature that was meant
to take load off of the hub is doing more harm than good in terms of
breaking subscriptions

* Update delivery_worker.rb
Matt Jankowski 0d70fe2659 Spec coverage and refactor for pubsub/delivery worker ()
* Framework for delivery worker spec

* Refactor of pubsub delivery worker
haoyayoi 2fba94b36e add content-type in pubsubhubhub request header ()
* add content-type in pubsubhubhub request header

* fix type
Eugen Rochko 81584779cb More robust PuSH subscription refreshes ()
* Fix  - Use sidekiq scheduler to refresh PuSH subscriptions instead of cron

Fix an issue where / in domain would raise exception in TagManager#normalize_domain

PuSH subscriptions refresh done in a round-robin way to avoid hammering a single
server's hub in sequence. Correct handling of failures/retries through Sidekiq (see
also ). Optimize Account#with_followers scope. Also, since subscriptions
are now delegated to Sidekiq jobs, an uncaught exception will not stop the entire
refreshing operation halfway through

Fix  - Correct user agent header on outgoing http requests

* Add test for SubscribeService

* Extract #expiring_accounts into method

* Make mastodon:push:refresh no-op

* Queues are now defined in sidekiq.yml

* Queues are now in sidekiq.yml
Eugen 17c591ffba Punycode URI normalization ()
* Fix  - Whenever about to send a HTTP request, normalize the URI

* Add test for IDN request in FetchLinkCardService

* Perform IDN normalization on domains before they are stored in the DB
Matt Jankowski c44a700252 Quick best practice cleanup of views/helpers ()
* Remove trailing whitespace

* Use query methods instead of explicit .blank? checks
Eugen 6d6a429af8 Rewrite Atom generation from stream entries to use Ox instead of Nokogiri ()
* Rewrite Atom generation from stream entries to use Ox instead of Nokogiri::Builder

StreamEntry is now limited to only statuses, which allows some optimization. Removed
extra queries on AccountsController#show. AtomSerializer instead of AtomBuilderHelper
used in AccountsController#show, StreamEntriesController#show, StreamEntryRenderer
and PubSubHubbub::DistributionWorker

PubSubHubbub::DistributionWorker moves n+1 DomainBlock query to PubSubHubbub::DeliveryWorker
instead.

All Salmon slaps that aren't based on StreamEntry still use AtomBuilderHelper and Nokogiri

* All Salmon slaps now use Ox instead of Nokogiri. No touch from status on account
Eugen Rochko bda37489ac Remove PuSH subscriptions when delivery is answered with a 4xx error
Eugen Rochko 6c28886317 Improve background jobs params and error handling
Eugen Rochko 668013265c Restoring old async behaviour of thread resolving as it proved to be more robust
Eugen Rochko 4a2347da41 Track successful PuSH deliveries
Eugen Rochko cc70f28f19 Adding rack timeout of 30sec, PuSH jobs moved to push queue so they
can be processed separately
Eugen Rochko 2d2c81765b Adding embedded PuSH server