Comments (6)
@hanicab How are you running your queue workers?
I found that a similar issue is caused because of the long running worker queue. I ended up on rather simple fix for this issue. Switch production to run worker:listen instead of worker:queue. There is a very small performance penalty for booting the framework for each job but it is better to get the right and proper result.
from laravel-multitenancy.
@benddailey Thank you for your reply,
I use horizon,
The problem is only when dispatching queued closure from tenant context (as described)
Works perfectly :
MyCustomJob::dispatch();
Not working (current tenant not dtermined exception) :
dispatch(function(){
Order::where('id',123)->delete();
});
from laravel-multitenancy.
Try again with the release 3.0.3. Thanks!
from laravel-multitenancy.
Try again with the release 3.0.3. Thanks!
I'm on 3.0.3 and I encounter the same error.
from laravel-multitenancy.
@bcalik, please try adding CallQueuedClosure::class
to queueable_to_job
in config/multitenancy.php
, so finally, you should have the config like so:
'queueable_to_job' => [
// ...
CallQueuedClosure::class => 'closure', // <-- ADD THIS
// ...
],
Thanks
from laravel-multitenancy.
Solved with release 3.1.0.
from laravel-multitenancy.
Related Issues (20)
- When dispatching a Tenant Aware Job in sync mode from a test, any prior/current DB transaction is cleared HOT 2
- Model ignore tenant when add Observer HOT 2
- Tenant password reset token is being stored on landlord password_reset_tokens table HOT 1
- Prefixing cache doesn't work fine with file-store HOT 3
- Conflict with Rabbitmq package from vyuldashev HOT 1
- Scheduler : Large (longer) jobs, multiple tenants, stops.
- Tenant-Aware Job Scheduling with Horizon HOT 4
- MakeQueueTenantAwareAction seems to break active requests when Queue Connection is sync HOT 4
- base table or view not found with AWS SQS queue for job TenantAware HOT 12
- randomly receive Invalid catalog name: 1046 No database selected (Connection: mysql, SQL: insert into failed_jobs (uuid, connection, queue, payload, exception, failed_at) on queue sqs HOT 5
- Tenant Aware Queue Fails No Database Selected when running from supervisor in a multi tenant environment using AWS SQS FIFO HOT 2
- Update documentation at https://spatie.be to `v3` HOT 3
- in_array(): Argument #2 ($haystack) must be of type array, null given {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, null given at /spatie/laravel-multitenancy/src/Actions/MakeQueueTenantAwareAction.php:79) HOT 1
- Cache issue with spatie/laravel-permission in TenantAware Command HOT 5
- Issue with the has function on different connections HOT 1
- I want to Connect to mongo DB for some tables but it is giving "Database connection [mongodb] not configured.", exception: "InvalidArgumentException",…} error
- Custom cache driver missing when switching Tenant HOT 2
- Cannot schedule jobs in Laravel 11 HOT 3
- Can't make route not tenant aware
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-multitenancy.