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

Always revert queue worker to the central context — fix #1229 #1251

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Conversation

stancl
Copy link
Member

@stancl stancl commented Sep 10, 2024

This PR changes the QueueTenancyBootstrapper to always revert back to the previous context. In practice, this means reverting back to the central context unless dispatchNow() was used.

This addresses the issue described in #1229 where if the queue worker stayed in the tenant context, it would not respond to queue:restart signals.

The $forceRefresh static property is now unused and deprecated.

v4 will simplify the bootstrapper further since there are fewer backwards compatibility concerns.

@stancl stancl changed the title Fix #1229 Always revert queue worker to the central context — fix #1229 Sep 10, 2024
@stancl
Copy link
Member Author

stancl commented Sep 10, 2024

@pr4xx Sorry about the delay on this, could you test the queue bootstrapper version from this PR?

https://raw.githubusercontent.com/archtechx/tenancy/e6ab0ee9af48771def77febc37933910cae52529/src/Bootstrappers/QueueTenancyBootstrapper.php

@niconico291
Copy link

@stancl Thanks for the update. I deployed your version of the QueueTenancyBootstrapper to the testing environment and after a few short tests, it seems to work fine. I will report back after some more days of testing.

@pr4xx
Copy link

pr4xx commented Sep 17, 2024

@stancl Some time has passed and had no issue with the updated code in production.

@stancl
Copy link
Member Author

stancl commented Sep 17, 2024

Awesome, thanks for all the help with this.

@stancl stancl merged commit ed52c48 into 3.x Sep 17, 2024
3 checks passed
@stancl stancl deleted the fix-1229 branch September 17, 2024 16:12
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.

3 participants