Django channels and aiohttp - channels websocket crash & blocking background worker

2018-06-17 Thread Nathan Bluvol
I am using Django 2.0.5, channels 2.1.1, aiohttp 3.1.3 two issues: (1) everything works for a while and then the channels websocket dies. Error is 'No handler for message type...'. (2) the background `await t1` call appears to be blocking and it appears that any attempt to trigger closeConnect

Django Channels 2.0 websocket crashing & blocking while using aiohttp

2018-06-17 Thread Nathan Bluvol
I am using Django 2.0.5, Python 3.6.2, Django Channels 2.1.1, aiohttp 3.1.3. Background: I am connecting to an external websocket, asynchronously, using aiohttp within a background channels worker. Once triggered, the socket connection stays alive, listening/streaming, and sends incoming message

Re: Django Channels 2.0 websocket crashing & blocking while using aiohttp

2018-06-17 Thread Andrew Godwin
I'm not quite sure why you seem to be using an AsyncConsumer outside of the context of the Channels routing framework? Anyway, it sounds like from what you're describing that your listen() method is blocking, which makes sense, as it connects to an external websocket and listens on it for messages

Django formset for models without foreign key

2018-06-17 Thread HashRocketSyntax
I'm trying to use formset to create connections between my Neo4j nodes. These models have been constructed using the django-neomodel package. They aren't related using foreign keys, but since this *isn't* an inline formset that shouldn't matter, right? *models.py* class Person(DjangoNode):