A demo application showing off how to use Django middleware and IronMQ to do analytics on each request.
-
Set your IronMQ credentials:
export IRON_PROJECT_ID="insert your project ID here" export IRON_TOKEN="insert your oauth token here"
-
Clone this repo
-
Set up your push queues
- Go into the Iron.io HUD and browse to your requests queue
- In the box labeled “Push Information”, select “multicast” for the Push Type.
- Leave Retries and Retries Delay at their default values.
- Hit “Update Queue”. You’ve turned the queue into a push queue.
-
Start redis:
redis-server
-
Start the app:
python manage.py runserver
-
Start the request worker:
python req_worker.py
-
Start the UA worker:
python ua_worker.py
Now when you load the page and refresh it a few times, your statistics should be collected.