Skip to content

Commit 59872a2

Browse files
committed
Remove some unused observer code
1 parent 1b62887 commit 59872a2

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

graphql_ws/django/subscriptions.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
11
from inspect import isawaitable
22
from graphene_django.settings import graphene_settings
33
from graphql.execution.executors.asyncio import AsyncioExecutor
4-
from rx import Observer
54
from ..base import BaseConnectionContext, BaseSubscriptionServer
65
from ..constants import GQL_CONNECTION_ACK, GQL_CONNECTION_ERROR, GQL_COMPLETE
76
from ..observable_aiter import setup_observable_extension
87

98
setup_observable_extension()
109

1110

12-
class SubscriptionObserver(Observer):
13-
def __init__(
14-
self, connection_context, op_id, send_execution_result, send_error, on_close
15-
):
16-
self.connection_context = connection_context
17-
self.op_id = op_id
18-
self.send_execution_result = send_execution_result
19-
self.send_error = send_error
20-
self.on_close = on_close
21-
22-
def on_next(self, value):
23-
self.send_execution_result(self.connection_context, self.op_id, value)
24-
25-
def on_completed(self):
26-
self.on_close(self.connection_context)
27-
28-
def on_error(self, error):
29-
self.send_error(self.connection_context, self.op_id, error)
30-
31-
3211
class ChannelsConnectionContext(BaseConnectionContext):
12+
3313
async def send(self, data):
3414
await self.ws.send_json(data)
3515

0 commit comments

Comments
 (0)