Skip to content
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

Special trace for cron / cavalcade jobs #8

Open
joehoyle opened this issue May 18, 2018 · 2 comments
Open

Special trace for cron / cavalcade jobs #8

joehoyle opened this issue May 18, 2018 · 2 comments

Comments

@joehoyle
Copy link
Member

joehoyle commented May 18, 2018

When a cavalcade job is running, we probably want to track it as a new service "$site_name-cavalcade" so metrics are not shared with web requests. We'd also want to change a lot of the metadata to be about the job being run. I can't find a way to actually hook before / after a cavalcade job is run though. Unless there's a special before / after WP CLI command hook - Cavalcade plugin doesn't provide any hooks for this.

This would possibly work at the Cavalcade-Runner level too, which is how we capture the data for CloudWatch, but this wouldn't let us get a xhprof trace of the job, or many other in-process data that we get for web requests.

@rmccue am I missing a way to be able to hook before a Cavalcade job is run? Aside from hook all and check defined( 'CAVALCADE_JOB_ID' ); perhaps.

Nikschavan pushed a commit that referenced this issue Mar 17, 2020
@roborourke
Copy link
Contributor

@joehoyle what about WP CLI's command hooks? Could you add some to the command the runner runs? Similar to how we run the ElasticPress indexing after WP is installed.

@joehoyle
Copy link
Member Author

@roborourke mm yeha that would probably work actually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants