File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ class Subscription(graphene.ObjectType):
41
41
42
42
async def resolve_mutation_example (root , info ):
43
43
try :
44
- # sub_id, q = await p.subscribe_to_channel('BASE')
45
44
sub_id , q = p .subscribe_to_channel ('BASE' )
46
45
while True :
47
46
payload = await q .get ()
48
47
yield payload
49
- except asyncio . CancelledError :
48
+ finally :
50
49
p .unsubscribe ('BASE' , sub_id )
51
50
52
51
async def resolve_count_seconds (root , info , up_to = 5 ):
Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ class Subscription(graphene.ObjectType):
41
41
42
42
async def resolve_mutation_example (root , info ):
43
43
try :
44
- # sub_id, q = await p.subscribe_to_channel('BASE')
45
44
sub_id , q = p .subscribe_to_channel ('BASE' )
46
45
while True :
47
46
payload = await q .get ()
48
47
yield payload
49
- except asyncio . CancelledError :
48
+ finally :
50
49
p .unsubscribe ('BASE' , sub_id )
51
50
52
51
async def resolve_count_seconds (root , info , up_to = 5 ):
You can’t perform that action at this time.
0 commit comments