Skip to content

Commit

Permalink
modify requirements to accommodate m2 local development
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Sep 25, 2023
1 parent e781a18 commit 9dcaf91
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 29 deletions.
9 changes: 0 additions & 9 deletions admin/base/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
from website import settings

if not settings.DEBUG_MODE:
from gevent import monkey
monkey.patch_all()
# PATCH: avoid deadlock on getaddrinfo, this patch is necessary while waiting for
# the final gevent 1.1 release (https://github.com/gevent/gevent/issues/349)
# 'foo'.encode('idna') # noqa

import os # noqa
from django.core.wsgi import get_wsgi_application # noqa
from website.app import init_app # noqa
Expand Down
8 changes: 0 additions & 8 deletions api/base/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
from website import settings
from api.base import settings as api_settings

if not settings.DEBUG_MODE:
from gevent import monkey
monkey.patch_all()
# PATCH: avoid deadlock on getaddrinfo, this patch is necessary while waiting for
# the final gevent 1.1 release (https://github.com/gevent/gevent/issues/349)
# 'foo'.encode('idna') # noqa

import os # noqa
from django.core.wsgi import get_wsgi_application # noqa
from website.app import init_app # noqa
Expand Down
8 changes: 0 additions & 8 deletions framework/postcommit_tasks/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from celery.canvas import Signature
from celery.local import PromiseProxy
from gevent.pool import Pool
from flask import _app_ctx_stack as context_stack

from website import settings
Expand Down Expand Up @@ -38,13 +37,6 @@ def postcommit_after_request(response, base_status_error_code=500):
_local.postcommit_celery_queue = OrderedDict()
return response
try:
if postcommit_queue():
number_of_threads = 30 # one db connection per greenlet, let's share
pool = Pool(number_of_threads)
for func in postcommit_queue().values():
pool.spawn(func)
pool.join(timeout=5.0, raise_error=True) # 5 second timeout and reraise exceptions

if postcommit_celery_queue():
if settings.USE_CELERY:
for task_dict in postcommit_celery_queue().values():
Expand Down
2 changes: 0 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from gevent import monkey
monkey.patch_all()

# PATCH: avoid deadlock on getaddrinfo, this patch is necessary while waiting for
# the final gevent 1.1 release (https://github.com/gevent/gevent/issues/349)
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ future==0.18.2
invoke==0.15.0
Werkzeug==1.0.0
Flask==1.0
gevent==1.2.2
Mako==1.0.7
Markdown==3.3.7
WTForms==1.0.4
Expand Down Expand Up @@ -82,7 +81,7 @@ django-storages==1.6.6
google-cloud-storage==0.22.0 # dependency of django-storages, hard-pin to version
django-dirtyfields==1.3.1
django-extensions==3.2.0
psycopg2==2.7.3 --no-binary psycopg2
psycopg2-binary==2.9.7
django-bulk-update==2.2.0

# Reviews requirements
Expand Down

0 comments on commit 9dcaf91

Please sign in to comment.