ghettoq icon indicating copy to clipboard operation
ghettoq copied to clipboard

New Messages not being popped When Using MultiDB Setup in Django

Open ghostrocket opened this issue 14 years ago • 2 comments

If I run ghettoq against the default db, everything works fine but if I setup a DB Router to direct all traffic for this app to a separate db, it writes the message to the db but it is never popped. If i restart celeryd, the message is popped and handled correctly.

Messages are being written/read from the correct (separate) db. Putting in some print statements shows that calling Message.objects.all().count() returns the number of objects at celeryd start time but that number never changes. It seems that the result set is being cached perhaps?

ghostrocket avatar Dec 26 '10 19:12 ghostrocket

So do you change this at runtime, or? celeryd needs to use the same configuration as the client if it is going to use the same database...

ask avatar Dec 29 '10 15:12 ask

no change at run time. i just restart the server with new settings.

i just confirmed this also happens with django-kombu, should i move this issue to celery?

ghostrocket avatar Dec 30 '10 20:12 ghostrocket