This file contains 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 multiprocessing | |
import re | |
from celery import Celery | |
from celery.worker.autoscale import Autoscaler as CeleryAutoscaler | |
class DAAutoscaler(CeleryAutoscaler): | |
# Try to keep the load above this point. | |
LOAD_MIN = .8 | |
# Try to keep the load below this. | |
LOAD_MAX = 1.1 |
This file contains 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 | |
from flask_restful import Api, Resource, reqparse | |
app = Flask(__name__) | |
api = Api(app) | |
users = [ | |
{ | |
"name": "Nicholas", | |
"age": 42, |