| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
So that it's trivial to run.
|
| |
|
|
|
|
|
| |
- harakiri-graceful-timeout additional timeout for the worker to attempt a graceful shutdown. The application can catch the termination signal and perform an "emergency shutdown"
- harakiri-graceful-signal determines which signal should be used (default SIGTERM)
- harakiri-graceful-queue-threshold only triggers a harakiri if/when the listen queue crosses a threshold. Harakiri continues to be checked until the conditions are met
- Changes are backwards compatible when the flags are not present
|
| |
|
|
|
|
| |
Which still runs on ruby 2.5.0.
Fix #2497
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
starting from `tests/travis.sh` subdivide test suites into:
* `tests/gh-python.sh`
* `tests/gh-deadlocks.sh`
* `tests/gh-rack.sh`
that share common variables and functions from `tests/gh-shared.sh`
refactor github test workflow to use a multidimensional matrix in order
to run each test suite (unittest, python, deadlocks) on each supported
python version and rack tests on each supported rack version.
closes https://github.com/unbit/uwsgi/issues/2479
leave `tests/travis.sh` because it can be useful as is somewhere else.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
As otherwise it would fail on github actions
|
| |
|
|
| |
So we don't need to duplicate it right now
|
| |\
| |
| | |
support io.BytesIO with wsgi.file_wrapper
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Should solve #1126
This change proposes to move the `PyObject_AsFileDescriptor()` calls
from the `wsgi.file_wrapper` into the response handler.
In the response handler, we can sensibly fall back to the `read()`
protocol using the existing `uwsgi_python_consume_file_wrapper_read()`
if converting the file-like object to an fd fails. Previously, after
the conversion to an fd failed, the `wsgi.file_wrapper` raised a
SystemError.
Running the added test application requires flask, start as follows:
uwsgi --enable-threads --workers 1 --threads 1 \
--plugin ./python37_plugin.so --http-socket :5000 \
-H ./venv/ --wsgi-file ./tests/testfilewrapper.py
$ for i in {1..3} ; do echo -n "test $i - "; curl localhost:5000/$i ; done
test 1 - cookie
test 2 - cookie
test 3 - cookie2
$ for i in {1..3} ; do echo -n "test $i - "; curl localhost:5000/stream$i ; done
test 1 - 0.10 cookie 0.20 cookie 0.30 cookie
test 2 - cookie
test 3 - cookie
|
| | |
| |
| |
| | |
... flask doesn't like the fact that there's a werkzeug module.
|
| | |
| |
| |
| |
| | |
Removes `TypeError: 'NoneType' object is not iterable` logs when
running tests.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For each plugin, allow to run multiple apps instead of just the
hard-coded tests/staticfile.py or examples/config2.ru apps.
This helps to add tiny apps for very basic regression testing. Only
a single request is made to / - the app should return 500 on error,
200 OK in the success case.
NOTE: Anything more complicated would probably justify rewriting the
whole script in Python.
|
| |/ |
|
| |\
| |
| | |
Add bindings to the Python API
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Python, open() opens files in read mode ('r') by default. Specifying
it is unnecessary and simply adds noise. It is Pythonic to instead rely
on this default value.
See https://docs.python.org/3/library/functions.html#open
> mode is an optional string that specifies the mode in which the file
> is opened. It defaults to 'r' which means open for reading in text
> mode.
|
| | | |
|
| | |
| |
| |
| |
| | |
As rack build fails with ruby < 2.2.2. While at it simplify ruby
handling by using rvm.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
| |
forgot about ping/pong, good game anyway
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The motivation is explained in 89b3840ab5fe2560a0801f6318dfdc54696bb1fd.
* Where I was fairly certain what exception is expected I replaced
"except:" with "except SomeConcreteClass:" (or otherwise simplified
the code)
* Where I wasn't sure what exaclty is being expected I just put
"except Exception:" to at least skip the "special" exceptions
|
| |
|
|
|
| |
and change the `uwsgi.websocket_send/send_binary/recv/recv_nb`
keyword argument from `uwsgi_input` to `request_context`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
convenient.
Example: tests/websockets_chat_2.py
Add: add a new API `uwsgi.input_object()` for get `struct wsgi_req *`
in python.
Modify: `uwsgi.websocket_send/send_binary/recv/recv_nb` now has a
kwarg: `uwsgi_input`.
If not provide the `uwsgi_input` keyword argument, The four function's
behavior not changed.
When provide the `uwsgi_input` keyword argument, The four function will
get `wsgi_req` from the argument.
In this way, uwsgi websocket functions can be used in other greenlets.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
The uwsgi.websocket_handshake call on line 52 was not indented properly, causing the Python interpreter to choke. Converting the few tabs sprinkled through the document to spaces fixes that error.
|
| | |
|