Commit Graph

39 Commits

Author SHA1 Message Date
Krukov D
37da462411 User friendly way to close websocket with code (via CloseException) (#468)
* User friendly way to close websocket with status

* More generic way  to close(whatever) connection by exception

* Fix import ordering for exceptions (isort)
2017-01-12 10:02:30 -08:00
Paul
f4f45dbb9f Sort imports and make Travis run isort (#425)
* Sort imports

* Make Travis run isort
2016-11-05 12:08:38 +01:00
Andrew Godwin
09b2a12be1 Change to accept being part of send/close 2016-10-05 15:59:55 -07:00
Andrew Godwin
0826b7997f Send messages after the end of consumers 2016-10-05 14:49:46 -07:00
Andrew Godwin
db0d2975a0 Remove middleware approach, change to simpler one 2016-10-05 12:06:34 -07:00
Andrew Godwin
dcfaf4122b Work in progress towards accepting websockets explicitly 2016-10-05 10:45:51 -07:00
Luke Hodkinson
0d25860cf2 Run workers in threads. (#322)
* Use a mixin for common test-case code. This way we can have both
a regular channels test-case, and a transaction test-case, too.

* Adding a reference to django-cq.

* Adding the ability to launch a number of workers in threads.
This is to try and help reduce memory consumption.

* Adding a signal for process level worker startups.

* Cleaning up the threaded worker code.

* Use Python 2.7 friendly code.

* Making the runworker command show a little more information
about how many threads are running.

* Moving the worker ready signal into a method in order to support
polymorphic behavior.

* Ugh, I'm an idiot. Was launching the wrong run.

* Adding a call to the workers' `ready` in `runserver`.
2016-08-31 21:26:03 -07:00
Andrew Godwin
e7a354e03c Fixed #148: Close database connections when consumers finish. 2016-07-12 15:01:19 -07:00
Krukov D
2874a0972c Using logger.error instead of logger.exception (#191) 2016-06-02 16:25:26 -07:00
Andrew Godwin
bfacee6319 Add class-based consumers 2016-05-25 17:45:56 -07:00
Krukov D
9505906b42 Fix re-inserting, with tests (#146)
* Stopping re-inserting at first success

* Added a few tests for worker running

* Coping routes in channels layers at the ChannelTestCase

* Remake worker test with less mocking
2016-05-08 12:21:58 -07:00
Andrew Godwin
feea84f323 Introduce backpressure with ChannelFull 2016-05-05 22:48:12 -07:00
Andrew Godwin
96735b917b Make flake8 like indentation 2016-05-03 18:14:41 -07:00
Andrew Godwin
a9187b99fe More formatting fixes 2016-04-30 20:55:19 -07:00
Andrew Godwin
698c2aaca0 Fix worker.py formatting 2016-04-30 19:15:45 -07:00
Andrew Godwin
073cbca16d Fixed #116: Allow configuration of worker listening 2016-04-30 19:11:08 -07:00
Andrew Godwin
841e19da79 Change to a full pattern-based routing system. 2016-03-20 13:48:34 -03:00
Andrew Godwin
08d1f9a14d Graceful shutdown for workers on SIGTERM and SIGINT 2016-03-02 17:21:58 -08:00
Andrew Godwin
8fba5220d9 Detect if you forget to decorate things with enforce_ordering 2016-03-02 10:42:18 -08:00
Andrew Godwin
69186ef7b7 Replace linearize with the more useful enforce_ordering. 2016-02-24 00:40:38 +00:00
Andrew Godwin
d18c715f8f Fix core logging when no message on channel 2016-02-20 23:33:14 +00:00
Andrew Godwin
31447a4641 User auth fixing 2016-02-14 21:27:12 +00:00
Andrew Godwin
be1498768f HTTP Long Poll finishing off 2016-02-14 19:22:46 +00:00
Andrew Godwin
943733c447 Additional logging and --noworker option 2016-02-14 18:47:30 +00:00
Andrew Godwin
5ddeed4a25 Remove dead code 2016-02-09 13:01:46 -08:00
Andrew Godwin
5cd2cbdfee Add test suite for ASGI handlers 2016-02-05 15:53:01 -08:00
Andrew Godwin
b9464ca149 Start making channels work to ASGI spec. 2016-01-02 10:17:45 -08:00
Ben Cole
57f21d71e2 Added logging 2015-11-09 11:16:32 +01:00
Faris Chebib
414a4ab460 updated print statements 2015-09-10 12:26:08 -06:00
Andrew Godwin
638bf260f8 Fixed #6: Linearise decorator and better user session stuff 2015-09-10 11:52:49 -05:00
Andrew Godwin
48d6f63fb2 Change to consumers taking a single "message" argument 2015-09-08 01:04:36 -05:00
Andrew Godwin
39a82e2a5c Make worker print exceptions rather than explode 2015-09-02 00:09:14 -07:00
Andrew Godwin
433625da1e Start working on a WebSocket interface server 2015-06-10 20:39:36 -07:00
Andrew Godwin
80627d8e37 Working database backend and "runworker" command 2015-06-10 11:17:32 -07:00
Andrew Godwin
95e706f71f Fix line endings 2015-06-10 09:42:34 -07:00
Andrew Godwin
5a7af1e3af Add channel to every consumer signature, update msg fmt docs 2015-06-08 13:35:27 -07:00
Andrew Godwin
c2c1ffc5bd Make everything hang off of channel_layers 2015-06-08 12:40:47 -07:00
Andrew Godwin
2cc1d00e18 Separate channel backend from user-facing class 2015-06-08 12:22:23 -07:00
Andrew Godwin
6cd01e2bc1 Rename to plural "channels", start fleshing out req/resp cycle 2015-06-08 10:51:51 -07:00