about summary refs log tree commit diff
path: root/app/workers
AgeCommit message (Collapse)Author
2019-07-21Remove WebSub subscriptions (#11303)Eugen Rochko
2019-07-15Add periodic removal of older thumbnails for preview cards (#11304)Eugen Rochko
2019-07-12Change the retry limit in error of web push notification (#11292)han@highemelry
- Change the maximum count of retry for web push notification (Default -> 5). - In case of high load of subscribe server, the retries will be repeated many times. - Because the retries occupy the default queue, maximum retry count should be reduced.
2019-07-10Refactor fetching of remote resources (#11251)Eugen Rochko
2019-07-07Fix URLs appearing twice in errors of ActivityPub::DeliveryWorker (#11231)Eugen Rochko
2019-07-06Remove Salmon and PubSubHubbub (#11205)Eugen Rochko
* Remove Salmon and PubSubHubbub endpoints * Add error when trying to follow OStatus accounts * Fix new accounts not being created in ResolveAccountService
2019-07-02Change ActivityPub::DeliveryWorker to not retry HTTP 501 errors (#11233)Eugen Rochko
2019-07-02Add request pool to improve delivery performance (#10353)Eugen Rochko
* Add request pool to improve delivery performance Fix #7909 * Ensure connection is closed when exception interrupts execution * Remove Timeout#timeout from socket connection * Fix infinite retrial loop on HTTP::ConnectionError * Close sockets on failure, reduce idle time to 90 seconds * Add MAX_REQUEST_POOL_SIZE option to limit concurrent connections to the same server * Use a shared pool size, 512 by default, to stay below open file limit * Add some tests * Add more tests * Reduce MAX_IDLE_TIME from 90 to 30 seconds, reap every 30 seconds * Use a shared pool that returns preferred connection but re-purposes other ones when needed * Fix wrong connection being returned on subsequent calls within the same thread * Reduce mutex calls on flushes from 2 to 1 and add test for reaping
2019-06-04Refactor all ActivityPub deliveries to be serialized and signed through one ↵Eugen Rochko
concern (#10966)
2019-05-23Retry ActivityPub inbox delivery on HTTP 401 and 408 errors (#10812)ThibG
HTTP 401 responses returned by Mastodon's inbox controller may be temporary if, for instance, the requesting user's actor/key json could not be retrieved in a timely fashion. This changes allow retries instead of dropping the message entirely. Also added HTTP 408 as that error is by nature temporary.
2019-05-03Do not retry processing ActivityPub jobs raising validation errors (#10614)ThibG
* Do not retry processing ActivityPub jobs raising validation errors Jobs yielding validation errors most probably won't ever be accepted, so it makes sense not to clutter the queues with retries. * Lower RecordInvalid error reporting to debug log level * Remove trailing whitespace
2019-04-08Export and import show_reblogs together with following list (#10495)ThibG
* Refactor imports * Export show_reblogs when exporting list of followed users * Add support for importing show_reblogs with following collection * Fix tests
2019-04-03Export and import `hide_notifications` alongside user mutes (#10335)ThibG
* Export hide_notifications along with user mutes * Import hide_notifications along with muted users list * Add headers for CSV exports
2019-03-28Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)Eugen Rochko
Also, fix some n+1 queries Resolve #10365
2019-03-16Avoid race condition when streaming deleted statuses (#10280)ThibG
* Avoid race condition when streaming deleted statuses * Move redis lock to DistributionWorker to avoid extra Redis value
2019-03-14Fix wrong method used in PollExpirationNotifyWorker (#10265)Eugen Rochko
2019-03-12Fix poll update handler calling method was that was not available (#10246)Eugen Rochko
* Fix poll update handler calling method was that was not available Fix regression from #10209 * Refactor VoteService * Refactor ActivityPub::DistributePollUpdateWorker and optimize it * Fix typo * Fix typo
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* Process incoming poll tallies update * Send Update on poll vote * Do not send Updates for a poll more often than once every 3 minutes * Include voters in people to notify of results update * Schedule closing poll worker on poll creation * Add new notification type for ending polls * Add front-end support for ended poll notifications * Fix UpdatePollSerializer * Fix Updates not being triggered by local votes * Fix tests failure * Fix web push notifications for closing polls * Minor cleanup * Notify voters of both remote and local polls when those close * Fix delivery of poll updates to mentioned accounts and voters
2019-03-05Do not error out on unsalvageable errors in FetchRepliesService (#10175)ThibG
* Do not error out on unsalvageable errors in FetchRepliesService Fixes #10152 * Fix FetchRepliesWorker erroring out on deleted statuses
2019-02-28Improved remote thread fetching (#10106)ThibG
* Fetch up to 5 replies when discovering a new remote status This is used for resolving threads downwards. The originating server must add a “replies” attributes with such replies for it to be useful. * Add some tests for ActivityPub::FetchRepliesWorker * Add specs for ActivityPub::FetchRepliesService * Serialize up to 5 public self-replies for ActivityPub notes * Add specs for ActivityPub::NoteSerializer * Move exponential backoff logic to a worker concern * Fetch first page of paginated collections when fetching thread replies * Add specs for paginated collections in replies * Move Note replies serialization to a first CollectionPage The collection isn't actually paginable yet as it has no id nor a `next` field. This may come in another PR. * Use pluck(:uri) instead of map(&:uri) to improve performances * Fix fetching replies when they are in a CollectionPage
2019-02-13Filter incoming Create activities by relation to local activity (#10005)Eugen Rochko
Reject those from accounts with no local followers, from relays that are not enabled, which do not address local accounts and are not replies to accounts that do have local followers
2019-02-12Move sending account Delete to anyone but the account's followers to the ↵ThibG
pull̀ queue (#10016)
2019-02-03Add option to overwrite imported data (#9962)Eugen Rochko
* Add option to overwrite imported data Fix #7465 * Add import for domain blocks
2019-02-02Create Redisable#redis (#9633)ysksn
* Create Redisable * Use #redis instead of Redis.current
2019-01-20Fix multiple workers for the same scheduled status being queueable (#9875)Eugen Rochko
2019-01-06Fix wrong param name in scheduled statuses and return params in API (#9725)Eugen Rochko
The database column and API param are called in_reply_to_id, not in_reply_to_status_id, so it makes no sense to encode it that way
2019-01-06Fix PublishScheduledStatusWorker being queued with no arguments (#9724)Eugen Rochko
2019-01-05Add scheduled statuses (#9706)Eugen Rochko
Fix #340
2019-01-05Follow new account before unfollowing the old one during move (#9719)Eugen Rochko
2019-01-02Improve e-mail digest (#9689)Eugen Rochko
- Reduce time-to-digest from 20 to 7 days - Fetch mentions starting from +1 day since last login - Fix case when last login is more recent than last e-mail - Do not render all mentions, only 40, but show number in subject - Do not send digest to moved accounts - Do send digest to silenced accounts
2019-01-01Restore ReplyDistributionWorker to allow existing jobs to be processed (#9676)ThibG
2018-12-30Avoid duplicate work by merging ReplyDistributionWorker into ↵ThibG
DistributionWorker (#9660)
2018-12-30Reduce usage of LD signatures (#9659)ThibG
* Do not LDS-sign Follow, Accept, Reject, Undo, Block * Do not use LDS for Create activities of private toots * Minor cleanup * Ignore unsigned activities instead of misattributing them * Use status.distributable? instead of querying visibility directly
2018-12-29Add handler for Move activity (#9629)Eugen Rochko
2018-12-17Do no retry web push workers if the server returns a 4xx response (#9434)Eugen Rochko
Add timeout of 10s to web push requests
2018-12-03Improve account suspension speed and completeness (#9290)Eugen Rochko
- Some associations were missing from the clean-up - Some attributes were not reset on suspension - Skip federation and streaming deletes when purging a dead domain - Move account association definitions to concern
2018-11-27Skip deliveries to inboxes that have already been marked as unavailable (#9358)Eugen Rochko
2018-11-08Optimize the process of following someone (#9220)Eugen Rochko
* Eliminate extra accounts select query from FollowService * Optimistically update follow state in web UI and hide loading bar Fix #6205 * Asynchronize NotifyService in FollowService And fix failing test * Skip Webfinger resolve routine when called from FollowService if possible If an account is ActivityPub, then webfinger re-resolving is not necessary when called from FollowService. Improve options of ResolveAccountService
2018-10-25Allow inbox owner to view implicitly targeted ActivityPub payload (#9093)Eugen Rochko
Fix #9091
2018-10-17Improve support for aspects/circles (#8950)Eugen Rochko
* Add silent column to mentions * Save silent mentions in ActivityPub Create handler and optimize it Move networking calls out of the database transaction * Add "limited" visibility level masked as "private" in the API Unlike DMs, limited statuses are pushed into home feeds. The access control rules between direct and limited statuses is almost the same, except for counter and conversation logic * Ensure silent column is non-null, add spec * Ensure filters don't check silent mentions for blocks/mutes As those are "this person is also allowed to see" rather than "this person is involved", therefore does not warrant filtering * Clean up code * Use Status#active_mentions to limit returned mentions * Fix code style issues * Use Status#active_mentions in Notification And remove stream_entry eager-loading from Notification
2018-10-09Track historical space stats in PgHero to determine PostgreSQL growth (#8906)Eugen Rochko
2018-10-07Add conversations API (#8832)Eugen Rochko
* Add conversations API * Add web UI for conversations * Add test for conversations API * Add tests for ConversationAccount * Improve web UI * Rename ConversationAccount to AccountConversation * Remove conversations on block and mute * Change last_status_id to be a denormalization of status_ids * Add optimistic locking
2018-10-04Limit the number of people that can be followed from one account (#8807)Eugen Rochko
Configurable soft limit of 7,500, and above that, configurable ratio of 1.1 * followers, controlled by: - MAX_FOLLOWS_THRESHOLD - MAX_FOLLOWS_RATIO Fix #2311
2018-09-18Redesign forms, verify link ownership with rel="me" (#8703)Eugen Rochko
* Verify link ownership with rel="me" * Add explanation about verification to UI * Perform link verifications * Add click-to-copy widget for verification HTML * Redesign edit profile page * Redesign forms * Improve responsive design of settings pages * Restore landing page sign-up form * Fix typo * Support <link> tags, add spec * Fix links not being verified on first discovery and passive updates
2018-08-26Add CLI task for rotating keys (#8466)Eugen Rochko
* If an Update is signed with known key, skip re-following procedure Because it means the remote actor did *not* lose their database * Add CLI method for rotating keys bin/tootctl accounts rotate [USERNAME] Generates a new RSA key per account and sends out an Update activity signed with the old key. * Key rotation: Space out Update fan-outs every 5 minutes per 1000 accounts * Skip suspended accounts in key rotation
2018-08-25Disable retries on all scheduled tasks (#8413)Eugen Rochko
2018-08-25Add improved CLI interface for removing remote media (#8411)Eugen Rochko
./bin/tootctl media remove --days 7 --background Make the old rake task point to it
2018-08-21Revert to using Paperclip's filesystem storage, and fix dangling records in ↵ThibG
remove_remote (#8339) * Fix uncaching worker * Revert to using Paperclip's filesystem backend instead of fog-local fog-local has lots of concurrency issues, causing failure to delete files, dangling file records, and spurious errors UncacheMediaWorker
2018-08-21Get rid of all batch order warnings (#8334)Eugen Rochko
2018-08-19Keep scheduler jobs unique until they're done (#8287)Eugen Rochko