Changes the strategy so that after a message has been put on the wait queue, it is then checked to see if it became the next message during this time and if so, immediately flushed. Will hopefully fix#451.
i think this is a typo, as cookies aren't restricted by port, so even if you offload on the same domain, daphne will still work without having to specify a ``session_key`` GET parameter since it can read the django session cookie which it defaults to.
* Move project tests to its own directory.
* Install mock test dependency for Python2 only.
* Do not install tox inside tox environment.
* Exclude tests from sdist.
* Use recent pip on Travis-CI.
* Add custom TestUUIDModel for auto tests
* Update Binding to support models with UUIDField as primary key
Add and fix test_trigger_outbound_create_non_auto_pk.
Before updating pre_save_receiver, this new test failed with this error:
======================================================================
FAIL: test_trigger_outbound_create_non_auto_pk
(channels.tests.test_binding.TestsBinding)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\User\git\contribs\python\channels\channels\tests\test_binding.py", line 85, in test_trigger_outbound_create_non_auto_pk
self.assertEqual(received['payload']['action'], 'create')
AssertionError: u'update' != u'create'
* Mark runtests helper executable
* Bump required version of asgiref
We're probably making our life easier when we keep the Channels
dependencies roughly in sync. As a 1.0 release was made, I suggest to
require it.
* Simplify tox and Travis configuration
I hopefully simplified the tox configuration by following what I did in
the other four Channels projects.
I then had a good look at tox-travis and decided to remove it. It does
add a layer of indirection with, IMHO, not enough gain. To understand
what Travis is doing, one would need to consider two files (and
understand tox-travis) instead of just one file. It also introduces
another point of failure. What pushed me over was that there's a bug
with env matching (https://github.com/ryanhiebert/tox-travis/issues/55)
and tox or tox-travis seem to mask an Exception
(https://travis-ci.org/django/channels/jobs/195950971#L195) that would
be hard to debug.
The draw back is that we duplicate the Django dependency matrix, and the
commands that are executed in Travis and tox. We could add a "--with-qa"
flag to runtests.py to have it execute flake8 and isort to rectify the
latter.
I extracted test dependencies as I did for asgi_redis.
* Document supported versions
* Make benchmark installable module.
* Use passed url in the Benchmarker constructor.
* Correct percentile output.
* Import reactor globally.
Since it used in the benchmarker.
* Fix for session shenanigans with WebsocketDemultiplexer
Session data was getting lost in the demux due to the session getting
saved after only the first connect/disconnect consumer was run.
* fix for flake8
* flake8 again
flake8 again
* User friendly way to close websocket with status
* More generic way to close(whatever) connection by exception
* Fix import ordering for exceptions (isort)
* more consistent metrics
More consistent metrics, in particular for consumers such as Graphite, CloudWatch etc. you don't want aggregated numbers per second, you want number since previous call. Since we don't want to track all the clients, total since start is the next best thing, because it can be easily calculated by the metrics consumer `count_since_last = pervious_count - current_count`
* changing 'queue_depth' to 'messages_pending', also making 'messages' plurar for 'max_age' to keep it consitent
* Added accept at default behavior for websocket generic cbv and pass message instead of dict
* Fix flake8
* Use HttpClient Instead of Client
* Fix lsort