-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outbox: Improve batch handling #1286
base: trunk
Are you sure you want to change the base?
Conversation
* add some actions * fix phpdoc * Use "Unreleased" instead of version number * Add readme * Switch actions props @obenland * renamed action names * fix phpdoc * fix phpdoc * fix phpdoc * fix namings * fix phpcs issues
We'll do that in a separate PR
* Stream: Only surface errors in Outbox processing Also adds support for comment and user types. * Add changelog * fix readme * update to new batch processing * fix phpcs * fix phpcs * re-use wordings from the rest controllers * fix phpcs * restructure the output to match the errors * revert latest changes * Fixed changelog --------- Co-authored-by: Matthias Pfefferle <[email protected]>
Makes it a bit easier to see what's happening when reading the code.
* Outbox Batch: Only pass outbox id to jobs * Remove unnecessary imports
This allows us to filter by ID and to better debug by title.
f4ab80b
to
39a3a1c
Compare
Co-authored-by: Konstantin Obenland <[email protected]>
@obenland what do you mean? all the |
Right, I would have expected those to also be canceled and the Outbox item published |
Ah, that is what you meant! makes sense! |
$meta_query = array( | ||
array( | ||
'key' => '_activitypub_object_id', | ||
'value' => $object_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Blog users, the object_id contains a timestamp (http://localhost:8888/?p=1834#activity-update-2025-02-11T21:02:54Z
), so there won't be a shared object_id between activities. Should we remove the hash for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should either use the guid of the original Outbox-Item or the get_id
of the original $wp_object
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the original $wp_object
, which it already saves currently, just with the added hash. we could strip the hash in Outbox::add()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels hacky! the hash was a workaround because we had no persistant IDs. I would like to fix that, so that we do no longer have the hashes anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Could I leave that with you? I still don't feel super confident in that area
After a new item is added to the Outbox, every pending item of the same type will be "invalidated". This way, we ensure that older
Update
s won't be published if there is already a newer one.Aside from that, this PR allows us to filter by ID and to better debug by title.