From 6b38ddb9b6336ea0cc8163072883fc7751eea696 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 31 Jul 2014 16:46:02 -0400 Subject: [PATCH] Remove the gpled loremipsum module. --- requirements-nover.txt | 1 - requirements.txt | 14 ++++++++------ test/testlogs.py | 7 +++++-- util/expiration.py | 4 ++-- workers/worker.py | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/requirements-nover.txt b/requirements-nover.txt index f9352aa02..bb2435874 100644 --- a/requirements-nover.txt +++ b/requirements-nover.txt @@ -19,7 +19,6 @@ xhtml2pdf redis hiredis docker-py -loremipsum pygithub flask-restful jsonschema diff --git a/requirements.txt b/requirements.txt index e82f94c7b..662ee7265 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -APScheduler==2.1.2 +APScheduler==3.0.0 Flask==0.10.1 Flask-Login==0.2.11 Flask-Mail==0.9.0 @@ -12,7 +12,7 @@ Pillow==2.5.1 PyGithub==1.25.0 PyMySQL==0.6.2 PyPDF2==1.22 -SQLAlchemy==0.9.6 +SQLAlchemy==0.9.7 Unidecode==0.04.16 Werkzeug==0.9.6 alembic==0.6.5 @@ -20,9 +20,11 @@ aniso8601==0.82 argparse==1.2.1 beautifulsoup4==4.3.2 blinker==1.3 -boto==2.31.1 -docker-py==0.3.2 +boto==2.32.0 +coverage==3.7.1 +docker-py==0.4.0 ecdsa==0.11 +futures==2.1.6 gevent==1.0.1 greenlet==0.4.2 gunicorn==18.0 @@ -30,7 +32,6 @@ hiredis==0.1.4 html5lib==0.999 itsdangerous==0.24 jsonschema==2.3.0 -loremipsum==1.0.2 marisa-trie==0.6 mixpanel-py==3.1.3 mock==1.0.1 @@ -48,7 +49,8 @@ redis==2.10.1 reportlab==2.7 requests==2.3.0 six==1.7.3 -stripe==1.18.0 +stripe==1.19.0 +tzlocal==1.1.1 websocket-client==0.11.0 wsgiref==0.1.2 xhtml2pdf==0.0.6 diff --git a/test/testlogs.py b/test/testlogs.py index 4310b92c3..27fe7c47b 100644 --- a/test/testlogs.py +++ b/test/testlogs.py @@ -1,9 +1,9 @@ import logging from random import SystemRandom -from loremipsum import get_sentence -from functools import wraps +from functools import wraps, partial from copy import deepcopy +from jinja2.utils import generate_lorem_ipsum from data.buildlogs import RedisBuildLogs @@ -12,6 +12,9 @@ logger = logging.getLogger(__name__) random = SystemRandom() +get_sentence = partial(generate_lorem_ipsum, html=False, n=1, min=5, max=10) + + def maybe_advance_script(is_get_status=False): def inner_advance(func): @wraps(func) diff --git a/util/expiration.py b/util/expiration.py index b3f5732fe..ca2e5dacd 100644 --- a/util/expiration.py +++ b/util/expiration.py @@ -2,7 +2,7 @@ import calendar import sys from email.utils import formatdate -from apscheduler.scheduler import Scheduler +from apscheduler.schedulers.background import BackgroundScheduler from datetime import datetime, timedelta from data import model @@ -10,7 +10,7 @@ from data import model class ExpirationScheduler(object): def __init__(self, utc_create_notifications_date, utc_terminate_processes_date): - self._scheduler = Scheduler() + self._scheduler = BackgroundScheduler() self._termination_date = utc_terminate_processes_date soon = datetime.now() + timedelta(seconds=1) diff --git a/workers/worker.py b/workers/worker.py index acfff9638..8438ce99b 100644 --- a/workers/worker.py +++ b/workers/worker.py @@ -4,7 +4,7 @@ import signal import sys from threading import Event, Lock -from apscheduler.scheduler import Scheduler +from apscheduler.schedulers.blocking import BlockingScheduler from datetime import datetime, timedelta from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from threading import Thread @@ -64,7 +64,7 @@ class WorkerStatusHandler(BaseHTTPRequestHandler): class Worker(object): def __init__(self, queue, poll_period_seconds=30, reservation_seconds=300, watchdog_period_seconds=60): - self._sched = Scheduler() + self._sched = BlockingScheduler() self._poll_period_seconds = poll_period_seconds self._reservation_seconds = reservation_seconds self._watchdog_period_seconds = watchdog_period_seconds