Cakephp, gearman workers and changing database connection on the fly issue
howdy!
We have created a SaaS app using cakephp 1.3 which is pulling in data from a 3rd party API and populating the database (each subdomain has its own database) . We are in process of moving our architecture to a gearman for the 3rd party API. Each subdomain would submit a workload to the queue and corresponding worker (multiple instances of the same workers exists simultaneously) would execute it. I've written the worker using the same code base and do just switch the db connection details on the fly. This work alright when the worker instance(s) are dealing with one subdomain connection details at a given time. My problem is that if more than one workload is from different subdomains are being served by the gearman workers in parallel,some of the data fetched from one subdomain ends up being in the other subdomain. The db config is probably being switched because of the underlying cakephp core cache? Singleton?
I was wondering if its the case. Its kinda a difficult debugging what the issue is. It would be immensely helpful if you could throw me some pointers.
Thanks,
-Ketan.
http://www.innovatechnologies.in
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home