Skip to content

Migrate Notifications server to python #198 #526

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

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

stopnoanime
Copy link
Contributor

Migrated the server. Used socketify.py for high performance WebSockets. The server configuration variables and deployment remain the same. Additionally the server is now tested using the normal Django test suite.

@stopnoanime stopnoanime requested a review from MasloMaslane as a code owner June 5, 2025 09:47
response.raise_for_status()
result = await response.json()

if result.get('status') != 'OK':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a good idea. Since we're using HTTP, the client should rely on appropriate status codes - for example, 401 (Unauthorized). Instead of checking a JSON field, we should check the status code, especially since those fields can be somewhat opaque. Therefore, refactoring views.py would be a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. I wanted only to rewrite the node.js server without changing anything else, but assuming that no one else uses this endpoint it should be changed.

@stopnoanime stopnoanime marked this pull request as draft June 8, 2025 21:13
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