-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Removed check isCurrent from makeCurrent #115
Removed check isCurrent from makeCurrent #115
Conversation
@masterix21 I'd like to know more about this problem that you described. How can it be reproduced? I noted in the conversation in #111 that this PR now introduces issues with tests...not limited to tests that depend on jobs/queues (it seems). I can't find a way around so maybe I can see if there's a different solution to the problem you described above...? |
I’ve found the bug calling a chained queue: FirstJob::withChain([
new SecondJob(),
]); If you try to call the migration command from public function handle()
{
Artisan::call(‘tenant:artisan “migrate --database=tenant --path=database/migrations/tenant” --tenant=1’);
} |
@masterix21 Thx. I'll try to look into it this weekend. In the meantime, any thoughts on my now-broken-with-the-latest-release tests...? |
@masterix21 Some questions:
In production I have a similar call from a job, which works, but it's not chained. Alright....thx again. I'll post any findings if/when I get a chance to look at it. In the meantime, it's late and I've got to get my beauty sleep. ;-) |
Yes, all jobs (and commands) are TenantAware. About your second question, no, I'm using --, the iPad changed to -. UPDATE: code updated ;) |
I found the problem, and was an arrow function in my code: I solved changing it to a classic closure function. Check restored with 1.6.6 version, I'm sorry for the mistake. |
Hey @masterix21 ....thx for the additional input/investigation. I had hoped to get time over the weekend to look into it some more....but didn't. :-( That's fantastic that you found the problem. Great work...! 🤓 Anyway, I did sit down this morning and try to find a simple way to show what I believe to still be a problem....although not related, perhaps, to what we've been looking at. Please refer to #117 for a bit more information. As I stated there (#117 ), I'm hoping someone can help see whether there's actually a problem or not and, if so, where it might be and what the solution might be. Thx again...! 💪 |
It resolves a bug introduced by #111 PR.
Using a job to execute an Artisan command (
Artisan::call(...)
, the Tenant is supplied, but Laravel resets the configuration applied by the tasks. To solve the problem, I removed the lines from 17 to 20 fromTenant
model.