This commit is contained in:
Kenneth Reitz
2012-12-20 02:47:15 -05:00
parent 137f0d44aa
commit b387ee2dea
3 changed files with 4 additions and 19 deletions
+1 -1
View File
@@ -1 +1 @@
web: gunicorn httpbin:app -b "0.0.0.0:$PORT" -w 9 -k eventlet -t 3 --name httpbin
web: gunicorn httpbin:app
+1 -12
View File
@@ -10,9 +10,7 @@ This module provides the core HttpBin experience.
import base64
import json
import os
import time
import librato
import timelibra
from flask import Flask, Response, request, render_template, redirect, jsonify, make_response
from raven.contrib.flask import Sentry
@@ -39,20 +37,11 @@ app = Flask(__name__)
# Setup error collection
sentry = Sentry(app)
metrics = librato.connect(
os.environ.get('LIBRATO_USER'),
os.environ.get('LIBRATO_TOKEN')
).get_counter('httpbin-requests')
# ------
# Routes
# ------
@app.after_request
def log_metrics(r):
metrics.add(10)
return r
@app.route('/')
def view_landing_page():
"""Generates Landing Page."""
+2 -6
View File
@@ -5,11 +5,7 @@ Werkzeug==0.8.1
argparse==1.2.1
blinker==1.2
decorator==3.3.2
distribute==0.6.31
eventlet==0.9.16
greenlet==0.3.1
gunicorn==0.13.4
librato==0.2
gunicorn==0.16.1
raven==1.9.3
simplejson==2.4.0
wsgiref==0.1.2
wsgiref==0.1.2