Set Tenant Context in Queues and Crons
Hello together,
I currently try to support multi tenancy in my application and I wounder what is the best practice to work with it in queues and crons. I have some Actions which can be triggerd from queueus, crons and the panel. The panel topic is working but in the queue and cron part I have some problems. I have tried to archive to set the tenant with the following code:
But it seems it needs an authenticated user. Because this is missing I receiving this error in Tinkerwell:
So I have tried to login the user before and it worked but I don't think taking the first user of a team is not the best practice:
I'am not very happy with this solution. Does anybody have a hint?
0 Replies