Skip to content

Commit

Permalink
missing required package
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Jan 7, 2025
1 parent d853b9e commit f2d76aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pubnub/event_engine/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,15 @@ async def delayed_reconnect_async(self, delay, attempt):
elif response.status.error:
self.logger.warning(f'Reconnect failed: {response.status.error_data.__dict__}')
self.failure(response.status.error_data, attempt, self.get_timetoken())
else:
elif 't' in response.result:
cursor = response.result['t']
timetoken = int(self.invocation.timetoken) if self.invocation.timetoken else cursor['t']
region = cursor['r']
messages = response.result['m']
self.success(timetoken=timetoken, region=region, messages=messages)
else:
self.logger.warning(f'Reconnect failed: Invalid response {str(response)}')
self.failure(str(response), attempt, self.get_timetoken())

def stop(self):
self.logger.debug(f'stop called on {self.__class__.__name__}')
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ flake8
pytest
pytest-asyncio
httpx
h2
requests
aiohttp
cbor2
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/subscribe/steps/then_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def step_impl(ctx):
@async_run_until_complete
async def step_impl(context, channel1, channel2):
context.pubnub.unsubscribe().channels([channel1, channel2]).execute()
await asyncio.sleep(0.5)
await asyncio.sleep(3)


@then(u'I don\'t observe any Events and Invocations of the Presence EE')
Expand Down

0 comments on commit f2d76aa

Please sign in to comment.