Browse Source

fixed faafo-api http server hanging

pull/3/head
Sebastian Rieger 3 years ago
parent
commit
f0d4cd0f80
  1. 8
      faafo/faafo/api/service.py
  2. 2
      faafo/requirements.txt

8
faafo/faafo/api/service.py

@ -16,8 +16,8 @@ import cStringIO
from pkg_resources import resource_filename
import flask
import flask.ext.restless
import flask.ext.sqlalchemy
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from kombu import Connection
from kombu.pools import producers
@ -60,7 +60,7 @@ template_path = resource_filename(__name__, "templates")
app = flask.Flask('faafo.api', template_folder=template_path)
app.config['DEBUG'] = CONF.debug
app.config['SQLALCHEMY_DATABASE_URI'] = CONF.database_url
db = flask.ext.sqlalchemy.SQLAlchemy(app)
db = SQLAlchemy(app)
Bootstrap(app)
@ -96,7 +96,7 @@ class Fractal(db.Model):
db.create_all()
manager = flask.ext.restless.APIManager(app, flask_sqlalchemy_db=db)
manager = APIManager(app, flask_sqlalchemy_db=db)
connection = Connection(CONF.transport_url)

2
faafo/requirements.txt

@ -9,7 +9,7 @@ SQLAlchemy>1.3,<1.4 # 1.4 breaks faafo list
Pillow==2.4.0 # MIT
requests>=2.5.2
Flask-Bootstrap
Flask>=0.10,<1.0
Flask
flask-restless
flask-sqlalchemy
oslo.config>=2.3.0 # Apache-2.0

Loading…
Cancel
Save