Skip to content

Commit b8dc16a

Browse files
committed
Changed Apollo class name and added websocket param to class init
1 parent 7344b59 commit b8dc16a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

subscriptions/subscription_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def unsubscribe(self, sub_id):
3838

3939
def wait_and_get_message(self):
4040
while True:
41-
self.pubsub.get_message()
42-
gevent.sleep(.001)
41+
self.pubsub.get_message() # might need to monkey patch
42+
gevent.sleep(.001) # may not need this sleep call
4343

4444

4545
class ValidationError(Exception):

subscriptions/subscription_transport_ws.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
# apollo subscription-transport constructor
1818

1919

20-
class ApolloSubscriptionService(WebSocketApplication):
20+
class ApolloSubscriptionServer(WebSocketApplication):
2121

22-
def __init__(self, subscription_manager):
22+
def __init__(self, subscription_manager, websocket):
2323
assert subscription_manager, "Must provide\
2424
'subscription_manager' to websocket app constructor"
2525
self.subscription_manager = subscription_manager
2626
self.connection_subscriptions = {}
2727
self.connection_context = {}
28-
super(ApolloSubscriptionService, self).__init__()
28+
super(ApolloSubscriptionServer, self).__init__(websocket)
2929

3030
def unsubscribe(self, graphql_sub_id):
3131
self.subscription_manager.unsubscribe(graphql_sub_id)

0 commit comments

Comments
 (0)