Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 1.065 kB

A demo application showing off how to use Django middleware and IronMQ to do analytics on each request.

Installation

  1. Install Django
  2. Install Redis
  3. Install py-redis
  4. Sign up for IronMQ
  5. Set your IronMQ credentials:

    export IRON_PROJECT_ID="insert your project ID here"
    export IRON_TOKEN="insert your oauth token here"
    
  6. Clone this repo

  7. 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.
  8. Start redis: redis-server
  9. Start the app: python manage.py runserver
  10. Start the request worker: python req_worker.py
  11. 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.

Jump to Line
Something went wrong with that request. Please try again.