-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poc: Websockets for user notifications #1460
base: main
Are you sure you want to change the base?
Conversation
@@ -46,7 +46,7 @@ lint: check_api_schema | |||
flake8 terraso_backend && isort -c terraso_backend && black --check terraso_backend | |||
|
|||
lock: pip-tools | |||
CUSTOM_COMPILE_COMMAND="make lock" pip-compile --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements.txt requirements/base.in requirements/deploy.in | |||
CUSTOM_COMPILE_COMMAND="make lock" pip-compile --allow-unsafe --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements.txt requirements/base.in requirements/deploy.in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: what do we need --allow-unsafe
for?
@@ -4,7 +4,7 @@ services: | |||
build: | |||
context: . | |||
dockerfile: Dockerfile.dev | |||
command: python terraso_backend/manage.py runserver 0.0.0.0:${PORT} | |||
command: daphne -b 0.0.0.0 -p ${PORT} "terraso_backend.config.asgi:application" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: on render, we have
Optionally override your Dockerfile's CMD and ENTRYPOINT instructions with a different command to start your service.
gunicorn --pythonpath=terraso_backend/ config.wsgi -b 0.0.0.0:${PORT}
With this change, can we eliminate this override? Or do we change it to something else?
ids = [member.id for member in members] | ||
users = set(users + ids) | ||
for user_id in users: | ||
notify_user(user_id, f"Updated: {self.mapbox_tileset_id}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: should the message be structured data?
suggestion: indicate that a tileset was updated. we may have other kinds of updates in the future.
shared_resource.target.membership_list.members.all() | ||
) # TODO Get only approved memberships | ||
ids = [member.id for member in members] | ||
users = set(users + ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: users
appears to be empty. should this be set(ids)
?
Description
Checklist
Related Issues
Fixes #....
Verification steps