Finding gunicorn worker number inside django app?

2013-11-16 Thread Roy Smith
I'm running django (1.4) with gunicorn (0.17.4) and gevent. I want to have the gunicorn worker number available inside of django, so I can include it in log messages and statsd data for tracking purposes. What I'm doing right now is I put a pre_request hook in my gunicorn config file which

Re: Problem with raw query and using in

2013-11-16 Thread Javier Guerra Giraldez
On Sat, Nov 16, 2013 at 7:40 AM, Thorsten Sanders wrote: > realms=[1] > data = AuctionData.objects.filter(itemid__exact=itemid,realm__in=realms) > data2 = AuctionData.objects.raw('SELECT * FROM auctiondata_auctiondata WHERE > itemid_id=%s AND realm_id in %s

Problem with raw query and using in

2013-11-16 Thread Thorsten Sanders
Hello, wondering if I am doing something wrong or it is a bug, using django 1.5.5, but also tried with 1.6 resulting in the same problem. When I do the following: realms=[1] data = AuctionData.objects.filter(itemid__exact=itemid,realm__in=realms) data2 = AuctionData.objects.raw('SELECT *