✪ rqworker --db 10 default high
16:06:30 RQ worker started, version 0.3.7
16:06:30
16:06:30 *** Listening on default, high...
16:06:49 high: jobs.multiply(5, 2) (2df52ba2-bd32-4849-a8e1-c5241c78b542)
16:06:49 Job OK, result = 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swagger: 2 | |
| info: | |
| title: The new Uber API | |
| description: Move your app forward with the Uber API | |
| version: "1.0.0" | |
| host: api.uber.com | |
| schemes: | |
| - https | |
| basePath: /v1 | |
| produces: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: clean distclean install run | |
| ENV ?= env | |
| VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));") | |
| ifeq ($(VENV),1) | |
| GUNICORN = gunicorn | |
| else | |
| GUNICORN = $(ENV)/bin/gunicorn | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| from django import http | |
| from django.core.urlresolvers import set_script_prefix | |
| from django.utils.encoding import force_str | |
| from django.core.handlers.wsgi import get_script_name | |
| from django_wsgi.handler import DjangoApplication | |
| import logging | |
| import logging | |
| import sys |