Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

poc: Websockets for user notifications #1460

wants to merge 3 commits into from

Conversation

josebui
Copy link
Contributor

@josebui josebui commented Sep 18, 2024

Description

Checklist

  • Corresponding issue has been opened
  • New tests added

Related Issues

Fixes #....

Verification steps

@josebui josebui self-assigned this Sep 18, 2024
@@ -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
Copy link
Member

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"
Copy link
Member

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}")
Copy link
Member

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)
Copy link
Member

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants