[6.x] Add --connection and --queue options to search:update - #15357
Open
edalzell wants to merge 4 commits into
Open
[6.x] Add --connection and --queue options to search:update#15357edalzell wants to merge 4 commits into
edalzell wants to merge 4 commits into
Conversation
Contributor
|
Might be nicer to make it a --queue=xxx option so you can override the default queue instead? Then you could just use the sync queue. |
Contributor
Author
Great idea! |
edalzell
marked this pull request as draft
September 3, 2026 17:03
Queueing stays the default; --sync runs indexing inline so deploy scripts wait until the index is ready.
Lets you pick the indexing connection per run, including --queue=sync so deploys wait until the index is ready.
sync is a queue connection, not a queue name.
--connection and --queue independently override InsertMultipleJob routing for a single search:update run.
edalzell
force-pushed
the
feature/sync-search-index-update
branch
from
September 3, 2026 22:11
ad8ecb0 to
90f69e5
Compare
edalzell
marked this pull request as ready for review
September 3, 2026 22:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We use the local search driver with zero-downtime deploys, and we run
statamic:search:updateon each deployment. If indexing stays on the default queue, the new release can go live before the search index is ready, so search is broken until a worker catches up.--connectionand--queueoverride the queue connection and queue name for that run.--connection=syncindexes inline, so when the deploy finishes, search is already ready. You can also send jobs to another connection and/or named queue without changing config.Queueing on the configured connection and queue is still the default. Docs for the new flags belong in the statamic.dev repo.
Test plan
php artisan statamic:search:update --connection=syncrebuilds the index before the command exitsphp artisan statamic:search:update --queue=indexingputs jobs on that queue name