Commit Graph

111 Commits (d5acf4275f7033bf2997bfcbbbc3a63c9606f101)

Author SHA1 Message Date
blackle 540d6efe88 Catch more errors in process_follows so it doesn't fail
Eugen Rochko 5442083b3c Split SalmonWorker into smaller parts, move profile updating into another job
Eugen Rochko 5b95be1c42 Replace calls to FeedManager#inline_render and #broadcast
Eugen c9ebd5d19f Fix wrong variable used in publish channel
Eugen 1b8c244dff Add proper message to PushUpdateWorker, use redis directly
Eugen 3d8b80e1cc Merge branch 'master' into broadcast-to-worker
Eugen Rochko 220bc48e8e Only render public payload once in FanOutOnWrite
Kurtis Rainbolt-Greene 22dcadedb4 We're going to want these nice helper methods, lets share them with a parent class that matches Rails 5 practices (application level abstraction)
Kurtis Rainbolt-Greene 9638894233 Moving in the inline render
Kurtis Rainbolt-Greene 220051b8b2 I don't actually think we need that.
Kurtis Rainbolt-Greene 0069c01285 Moving the queue_at into the worker
Kurtis Rainbolt-Greene 96ef933820 Replacing the broadcast method with the one defined in the feed manager
Kurtis Rainbolt-Greene 1e96ce378e By pushing this into a worker we can reduce the amount of time the feed manager using workers eat up a connection
Eugen Rochko bda37489ac Remove PuSH subscriptions when delivery is answered with a 4xx error
Eugen Rochko 6fd865c000 Spawn FeedInsertWorker to deliver status into personal feed
Eugen Rochko 82aaedec46 Reduce number of items in feeds, optimize regeneration worker slightly,
make regeneration worker unique, (only schedule/execute once at a time)
Eugen Rochko b21f7c28f6 Move OStatus processing back into default queue
Eugen Rochko b510a56c0c Only call regeneration worker after first login after a 14 day break
Eugen Rochko f722bd2387 Separate background jobs into different queues. ATTENTION: new queue "pull"
must be added to the Sidekiq invokation in your systemd file

The pull queue will handle link crawling, thread resolving, and OStatus
processing. Such tasks are more likely to hang for a longer time (due to
network requests) so it is more sensible to not make the "in-house" tasks
wait for them.
Eugen Rochko b7c1b12367 Make default admin UI page reports. Add admin UI for creating a domain block
Eugen Rochko e8875c6046 Import feature for following/blocking lists (addresses , , , )
Eugen Rochko 6b81d10030 Add digest e-mails
Eugen Rochko 40a4053732 Disable PuSH for blocked domains
Eugen Rochko 720ff55262 Adding more unit tests. Fixing Salmon slaps XML
Eugen Rochko db814543c0 Take out private toot distribution out of PuSH again
Eugen Rochko 446aad4ce2 Make PuSH only distribute to subscriptions that match follower domains
Allow PuSH to distribute private toots with that condition
Eugen Rochko 00b5731ecb After FollowService, re-fetch remote account asynchronously, do nothing
if account lock info was up to date, otherwise re-do the FollowService
with now updated information
Eugen Rochko 149887a0ff Make follow requests federate
Eugen Rochko 19b9e1e2c3 Preheat status cache
Eugen Rochko 3f075c7794 API for apps to register for push notifications
Eugen Rochko 8a880a3d46 Make blocks create entries and unfollows instantly, but do the clean up
in the background instead. Should fix delay where blocked person
can interact with blocker for a short time before background job
gets processed
Eugen Rochko cca82bf0a2 Move merging/unmerging of timelines into background. Move blocking into
background as well since it's a computationally expensive
Eugen Rochko f0de621e76 Fix - Fetch and display previews of URLs using OpenGraph tags
Eugen Rochko 6c28886317 Improve background jobs params and error handling
Eugen Rochko 86be6d48c9 Fix accidental distribution of hidden stream entries to PuSH subscribers
Eugen Rochko 49834a6e7f Add API for retrieving blocked accounts
Eugen Rochko 4c6809f6ab Adding some rescues to workers, e.g. don't fail removal job when status can't be found in the first place (already removed)
Eugen Rochko 0542773bca Make unfavouriting async to prevent timeout errors from leaving orphaned records behind
Eugen Rochko 6de079a5af Removing external hub completely, fix fixing digit-only hashtags,
removing web app capability from non-webapp pages
Eugen Rochko 668013265c Restoring old async behaviour of thread resolving as it proved to be more robust
Eugen Rochko f90133d2ad Thread resolving no longer needs to be separate from ProcessFeedService,
since that is only ever called in the background
Eugen Rochko f406e01fcf Add filters for suspended accounts
Eugen Rochko 58b3f4fd67 Fix - avatar errors no longer prevent remote accounts from being saved
(without avatar). Also improved search position of exact matches
Eugen Rochko 4a2347da41 Track successful PuSH deliveries
Eugen Rochko 93a90cd9c3 Delete statuses asynchronously but provide instant feedback in the API
Eugen Rochko cc70f28f19 Adding rack timeout of 30sec, PuSH jobs moved to push queue so they
can be processed separately
Eugen Rochko 4e351baf88 Fix URLs in inline-rendered XML
Eugen Rochko 3ba6531611 Fix setting of confirmed=true on successful confirmation
Eugen Rochko 50638174c8 More logging to ConfirmationWorker
Eugen Rochko 4eba76711b Adding backtracing to Salmon/Processing workers
Eugen Rochko 2d2c81765b Adding embedded PuSH server
Eugen Rochko 45c7ee39b3 Remove unneeded indices, improve error handling in background workers, don't needlessly reload reblogged status, send Devise e-mails asynchronously
Eugen Rochko 7dea6a23f7 Move Salmon processing to background as well as PuSH
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance
Eugen Rochko a91c3ef6ce Delegate processing of incoming PuSH data to background workers
Eugen Rochko bb4d1eb2e8 Improve feed regeneration
Eugen Rochko 3319473b2c Move PubSubHubbub pinging to a background worker
It can take as much as 0.5s if not longer to complete
Eugen Rochko 927333f4f8 Improve code style
Eugen Rochko 4bec613897 Fix - Thread resolving for remote statuses
This is a big one, so let me enumerate:

Accounts as well as stream entry pages now contain Link headers that
reference the Atom feed and Webfinger URL for the former and Atom entry
for the latter. So you only need to HEAD those resources to get that
information, no need to download and parse HTML <link>s.

ProcessFeedService will now queue ThreadResolveWorker for each remote
status that it cannot find otherwise. Furthermore, entries are now
processed in reverse order (from bottom to top) in case a newer entry
references a chronologically previous one.

ThreadResolveWorker uses FetchRemoteStatusService to obtain a status
and attach the child status it was queued for to it.

FetchRemoteStatusService looks up the URL, first with a HEAD, tests
if it's an Atom feed, in which case it processes it directly. Next
for Link headers to the Atom feed, in which case that is fetched
and processed. Lastly if it's HTML, it is checked for <link>s to the Atom
feed, and if such is found, that is fetched and processed. The account for
the status is derived from author/name attribute in the XML and the hostname
in the URL (domain). FollowRemoteAccountService and ProcessFeedService
are used.

This means that potentially threads are resolved recursively until a dead-end
is encountered, however it is performed asynchronously over background jobs,
so it should be ok.
Eugen Rochko 85b00d19b8 Moving Salmon notifications to background processing, fixing mini-profiler
behaviour with Turbolinks enabled, optimizing Rabl for production
Eugen Rochko 8eeec389c1 Add link to github project to footer, move FanOutOnWriteService calls to
DistributionWorker. That isn't the heaviest service, yet, but gotta start
somewhere