mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
gevent: set env var GEVENT_MONKEY_PATCH=1 in uwsgi.ini to enable monkey-patching explicitly in pywb.apps.wayback
This commit is contained in:
parent
63f44cbc26
commit
1a458d6b26
@ -1,11 +1,12 @@
|
||||
pywb 0.11.4 changelist
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* wombat: overrides ``window.crypto.getRandomValues()`` to use predictable random for improved
|
||||
* wombat: overrides ``window.crypto.getRandomValues()`` to use predictable 'random' values for improved
|
||||
replayability in many JS applications.
|
||||
|
||||
* fix gevent/uwsgi: add ``gevent.monkey.patch_all()`` to ``pywb.apps.wayback`` used by ``uwsgi.ini``.
|
||||
(Was relying on ``gevent-early-monkey-patch`` which is not yet available until uwsgi 2.1).
|
||||
* fix gevent/uwsgi: run ``gevent.monkey.patch_all()`` explicitly when loading ``pywb.apps.wayback`` if ``GEVENT_MONKEY_PATCH=1`` env var is set
|
||||
|
||||
Enabled by default in ``uwsgi.ini``. (Was previously relying on ``gevent-early-monkey-patch`` which is not yet available until uwsgi 2.1 is released).
|
||||
|
||||
|
||||
pywb 0.11.3 changelist
|
||||
|
@ -1,3 +0,0 @@
|
||||
def pytest_configure(config):
|
||||
import sys
|
||||
sys._called_from_test = True
|
@ -1,9 +1,10 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
if not hasattr(sys, '_called_from_test'): #pragma: no cover
|
||||
if os.environ.get('GEVENT_MONKEY_PATCH') == '1': #pragma: no cover
|
||||
# Use gevent if available
|
||||
try:
|
||||
from gevent.monkey import patch_all; patch_all()
|
||||
print('gevent patched!')
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user