Mark Felder
03a6e33b81
Skip the final refresh job if the activity is local
2024-10-09 16:25:58 -04:00
Mark Felder
b854e3836f
Remove pattern that can never match
2024-10-03 10:30:32 -04:00
Mark Felder
ba2ae5e40b
Check if a refresh is permitted by comparing timestamps before attempting to insert an Oban job
...
It's better to avoid inserting an Oban job that will just be rejected if it's not expensive to check.
2024-10-03 10:14:02 -04:00
Mark Felder
a2e7db43aa
Rename assignment for consistency
2024-09-30 14:23:04 -04:00
Mark Felder
47ce3a4a96
Schedule a final poll refresh before streaming out the notifications
2024-09-30 14:17:35 -04:00
Mark Felder
4b3f604f95
Skip refetching poll results if the object's updated_at is newer than the poll closed timestamp
2024-09-30 14:02:41 -04:00
Mark Felder
c077a14ce1
Add Oban job to handle poll refreshing and stream out the update
2024-09-30 13:54:56 -04:00
Mark Felder
a887188890
Oban: more unique job constraints
2024-09-06 09:42:53 -04:00
Mark Felder
a1951f3af7
Add Cron worker to clean up orphaned apps hourly
2024-09-04 10:59:58 -04:00
Mark Felder
1821ef4f15
Move user active check into Federator.perform/1
2024-08-28 18:35:09 -04:00
Mark Felder
8a3efa7152
More error annotations
2024-08-28 18:02:35 -04:00
Mark Felder
c5ca806aa0
Add back one of the duplicate checks to fix a test, document where it comes from
2024-08-28 17:57:34 -04:00
Mark Felder
380a6a6df3
:validate_object is not a real error returned from anywhere
2024-08-28 17:45:31 -04:00
Mark Felder
2346807ac9
Annotate error cases
2024-08-28 17:44:33 -04:00
Mark Felder
6ae629cfe0
Cancel ReceiverWorker jobs if the user account has been disabled / deactivated
2024-08-28 17:24:59 -04:00
Mark Felder
fc450fdefc
ReceiverWorker: cancel job if user fetch is forbidden
...
An instance block with authenticated fetch being required can cause this as we couldn't get the user to find their public key to verify the signature. Commonly observed if someone boosts/Announces a post from an instance that blocked you.
2024-08-28 15:45:16 -04:00
Mark Felder
a9aa810d3d
Change imports to generate an Oban job per each task
2024-08-22 13:24:07 -04:00
Mark Felder
089fa4d146
Improve Remote Object Fetcher error handling, Oban
2024-08-17 20:42:33 -04:00
Mark Felder
52e9bec156
Remove WorkerHelper
2024-07-30 11:34:48 -04:00
feld
c9042763b0
Merge branch 'oban/backup' into 'develop'
...
Backups Refactoring
See merge request pleroma/pleroma!4158
2024-07-29 16:07:35 +00:00
Mark Felder
775f45cfe2
Merge remote-tracking branch 'origin/develop' into oban/backup
2024-07-25 14:43:40 -04:00
Mark Felder
a964368e31
Add test to fetch and validate an activity that originally failed signature
2024-07-25 14:34:55 -04:00
Mark Felder
1b9c887dbb
Extract validate_signature/2 from the HTTPSignaturePlug
...
This logic only exists in the Plug, so attempting to validate the signature by calling the library function HTTPSignature.validate_conn/2 directly will never work because we do not attempt to construct the (request-target) and @request-target headers with both the commonly misinterpreted and correct implementation of this field. Therefore all attempts to validate a signature from an Oban Job will fail.
2024-07-25 12:54:27 -04:00
Mark Felder
1a482a73c3
Fix Optimistic Inbox for failed signatures
...
When signatures fail on incoming activities we put the job into Oban to be processed later instead of doing the user fetching and validation inline which is expensive and increases latency on the incoming POST request. Unfortunately we did not retain the :method, :request_path, and :query_string parameters from the conn so the signature validation and Oban Job would always fail.
This was most obvious when Mastodon sends Deletes for users your server has never seen before.
2024-07-25 11:46:30 -04:00
Mark Felder
5a62868106
Consider errors during HTTP GET and HEAD to be unrecoverable and insert a negative cache entry
...
This is for a normal HTTP error response or timeout while receiving the data. A hard error from a process crash, DNS lookup failure, etc should produce a different response than {:ok, %Tesla.Env{}} and the request/job will be retryable.
2024-07-24 15:43:49 -04:00
Mark Felder
731f7b87d2
Pad RichMediaWorker timeout to be 2s longer than the Rich Media HTTP timeout
2024-07-24 15:42:50 -04:00
Mark Felder
187897874b
Make backup timeout configurable
2024-07-23 10:30:57 -04:00
Mark Felder
e5cbbaf3f0
Extend the backup job time limit to 30 minutes
2024-07-23 10:30:57 -04:00
Mark Felder
ece063586b
Limit backup jobs to 5 minutes
2024-07-23 10:30:57 -04:00
Mark Felder
8f285a787f
Refactor backups to be fully controlled by Oban
2024-07-23 10:30:40 -04:00
Mark Felder
d27ad36ce4
Fix order of args for remove_mute/2
2024-07-22 18:25:37 -04:00
Mark Felder
f9647a86ed
Fix the ObjectValidator error matching
2024-07-21 00:03:51 -04:00
Mark Felder
fdeb8616e8
Increase timeout for background, remote fetcher, and user refresh jobs
2024-07-20 22:16:33 -04:00
Mark Felder
d62a9afed3
Improved detecting unrecoverable errors for incoming federation jobs
2024-07-20 21:53:03 -04:00
Mark Felder
b8503f1ad4
PollWorker jobs will not retry if the activity no longer exists.
2024-07-20 21:24:13 -04:00
feld
c45ee5fc82
Merge branch 'oban/fetcher-rejected' into 'develop'
...
Dialyzer fix for RemoteFetcherWorker
See merge request pleroma/pleroma!4183
2024-07-17 18:03:48 +00:00
Mark Felder
c05cbaa937
Dialyzer fix for RemoteFetcherWorker
2024-07-17 13:42:13 -04:00
Mark Felder
f753bd3380
Explicitly handle the GET and HEAD errors
2024-07-17 13:12:51 -04:00
Mark Felder
1e0d5934d5
Fix return for cancelling job
2024-07-17 12:51:38 -04:00
Mark Felder
d124d8645e
Rework some Rich Media functionality for better error handling
...
Oban should not retry jobs that are likely to fail again
2024-07-17 12:40:07 -04:00
Mark Felder
30defb1674
Create a DeleteWorker and change user and instance deletion jobs to use it
...
These deletion tasks are slow, but the other background jobs are not. This
will allow us to have a lower timeout on the normal background jobs.
2024-07-15 11:58:07 -04:00
Mark Felder
2f14990c5c
Change PurgeExpiredActivity to use the background queue
2024-07-15 11:45:13 -04:00
Mark Felder
2e2caad28d
Fix Oban jobs exiting with :error instead of :cancel
2024-07-15 11:45:12 -04:00
Mark Felder
1e8d1904e6
Define missing Oban timeouts
2024-07-15 10:27:37 -04:00
Mark Felder
f52b229baa
Oban: change :discard return values to :cancel
...
:discard will be removed in Oban 3.0. It was only meant for internal use.
2024-07-12 11:40:59 -04:00
Mark Felder
b051e68bb0
Discard Remote Fetcher jobs which errored due to an MRF rejection
2024-07-12 10:15:02 -04:00
Mark Felder
51a36bc9b8
Oban Jobs for refreshing users were not respecting the uniqueness setting
2024-06-28 10:12:58 -04:00
Mark Felder
17d04ccc8b
RichMedia backfill processing through Oban
2024-06-19 23:20:22 -04:00
Mark Felder
4dfa50f256
Rename RichMediaExpirationWorker to RichMediaWorker
2024-06-19 22:24:48 -04:00
Mark Felder
9c67637255
Refactor the async user refreshing to use Oban
...
Previous implementation could cause duplicate simultaneous profile fetches which is not polite.
2024-06-17 10:41:14 -04:00