-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add context to action processing #329
Conversation
6bdbeb1
to
70bbe09
Compare
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.
If we did the context as a slug => Name
then the slug
could be used by hooks and the Name
would be translatable for messages/output. The context array could be stored so only the slug needed to be passed.
I looked at making the context available for translation, but it's a proper noun in most cases - WP CLI, WP Cron - and pretty close to a proper noun in others - Admin List Table and Async Request - so I decided to instead leave it out of translation. Are there any benefits to using slugs elsewhere? e.g.
We'd also need to make sure it's got a filter. |
That sounds good. Some of the unit tests need to be updated for message string changes. |
@rrennick fixed. 👍 |
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.
@thenbrent LGTM. There is a merge conflict on hook parameter numbers. Once those are fixed this should be okay to merge.
So that we can log where the action was run from, e.g. WP CLI, WP Cron the Admin List Table or the upcoming Async Runner. Very handy for debugging issues after the fact. Fixes #129
Thanks @rrennick. I've rebased in a fix for the merge conflict. |
update message missed in #329
Add context to action processing / queue runners so that we can log where the action are run from, e.g. WP CLI, WP Cron the Admin List Table or the upcoming Async Runner.
Very handy for debugging issues after the fact.
Example logs entries: https://cld.wthms.co/fT0T96
Fixes #129