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

Add job id constant for hooks #53

Merged
merged 1 commit into from
Dec 15, 2017
Merged

Add job id constant for hooks #53

merged 1 commit into from
Dec 15, 2017

Conversation

dan-westall
Copy link
Contributor

Description

Currently theres no way to obtain the job id from within a method being run as a Cavalcade job. This adds the CAVALCADE_JOB_ID constant allowing access to the current job.

Copy link
Member

@rmccue rmccue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me.

Do you think there's also a use case for firing an action before (and maybe after) the job runs with the ID for logging/error handling? I'm thinking handling it at the meta level may be better than building into the job necessarily. (The constant is still useful for other use cases though.)

@dan-westall
Copy link
Contributor Author

@rmccue good idea, so If your happy with this pr, ready to merge?

@rmccue
Copy link
Member

rmccue commented Dec 15, 2017

If your happy with this pr, ready to merge?

Yep (and feel free to merge stuff that has an approved review; I only left it unmerged in case the action negated the need for this entirely).

@rmccue rmccue merged commit deca623 into master Dec 15, 2017
@rmccue rmccue deleted the add-job-id-access branch December 15, 2017 00:55
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

Successfully merging this pull request may close these issues.

None yet

2 participants