Skip to content

Commit

Permalink
Merge branch 'v0.9.1-branch' into 'master'
Browse files Browse the repository at this point in the history
V0.9.1 branch

See merge request sd/pseven/DjangoChannelsGraphqlWs!15
  • Loading branch information
stmarkevich committed Jan 27, 2022
2 parents 5fa540d + f1debba commit f868611
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) DATADVANCE, 2010-2021
Copyright (C) DATADVANCE, 2010-2022
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
Expand All @@ -23,6 +23,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Changelog

## [0.9.1] - 2022-01-27

- Minor fix in logging.

## [0.9.0] - 2021-10-19

- Ability to configure server notification queue limit per subscribtion.
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) DATADVANCE, 2010-2021
Copyright (C) DATADVANCE, 2010-2022
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
Expand Down Expand Up @@ -512,10 +512,19 @@ _A reminder of how to setup an environment for the development._

1. Install PyEnv to be able to work with many Python versions at once
[PyEnv→Installation](https://github.com/pyenv/pyenv#installation).
2. Install Python versions needed:
2. Install Python versions needed. The command should be executed in the project's directory:
```shell
$ pyenv local | xargs -L1 pyenv install
```
3. Check that pyenv works correctly. The command:
```shell
$ pyenv versions
```
should show python versions enlisted in [.python-version](.python-version).
If everything is set up correctly pyenv will switch version of python when
you enter and leave the project's directory. Inside the directory `pyenv which
python` should show you a python installed in pyenv, outside the dir it
should be the system python.
3. Install Poetry to the system Python.
```shell
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
Expand Down
2 changes: 1 addition & 1 deletion channels_graphql_ws/graphql_ws_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ async def _on_gql_connection_init(self, payload):
# Notify subclass a new client is connected.
await self.on_connect(payload)
except Exception as ex: # pylint: disable=broad-except
LOG.error(str(ex))
await self._send_gql_connection_error(ex)
# Close the connection.
# NOTE: We use the 4000 code because there are two reasons:
Expand All @@ -491,7 +492,6 @@ async def _on_gql_connection_init(self, payload):
# So mozilla offers us the following codes:
# 4000–4999 - Available for use by applications.
await self.close(code=4000)
LOG.error(str(ex))
else:
# Send CONNECTION_ACK message.
await self._send_gql_connection_ack()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build-backend = "poetry.masonry.api"
# Docs: https://python-poetry.org/docs/
[tool.poetry]
name = "django-channels-graphql-ws"
version = "0.9.0"
version = "0.9.1"
description = """Django Channels based WebSocket GraphQL server with \
Graphene-like subscriptions"""
authors = ["Alexander A. Prokhorov <alexander.prokhorov@datadvance.net>"]
Expand Down

0 comments on commit f868611

Please sign in to comment.