Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pass Laravel context through with schedule tasks#57918

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jradtilbrook
Copy link
Member

This propagates the Laravel Context through with Schedule Tasks so they carry the same contextual information from the schedule definition. Similar to how jobs, dispatched from requests or other jobs or commands carry the context from those entrypoints, this follows suit with schedule tasks.

avosalmon and nbreens reacted with rocket emoji
@github-actions
Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@rodrigopedra
Copy link
Contributor

Where would one add anything to the context when scheduling tasks?

On the./routes/console.php file? Outside anyArtisan::command() calls?

If so, wouldn't those commands (to add things into the context) be executed on every HTTP request, as the console commands are parsed to be avaiable usingArtisan::call()?

@jradtilbrook
Copy link
MemberAuthor

@rodrigopedra good question, you may set some context in service providers, or in thebefore hook on the schedule task itself. Ie I want to use this functionality within Nightwatch to share sample rate and tracing

rodrigopedra reacted with thumbs up emoji

@jradtilbrookjradtilbrook marked this pull request as ready for reviewNovember 26, 2025 06:26
@rodrigopedra
Copy link
Contributor

Haven't thought of those places. I was curious about how to do it.

Thanks for the heads-up =)

jradtilbrook reacted with laugh emoji

@taylorotwelltaylorotwell merged commite17bf44 intolaravel:12.xNov 26, 2025
74 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jradtilbrook@rodrigopedra@taylorotwell

[8]ページ先頭

©2009-2025 Movatter.jp