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: First working implementation of websockets. #526

Merged
merged 10 commits into from
May 25, 2017
Merged

Conversation

p0psicles
Copy link
Contributor

@p0psicles p0psicles commented May 3, 2016

This is a working POC, for replacing the current REST polling mechanisme we use for the Pnotifications, with Websockets. For more info please refer to FR: #495.

Currently it's just a POC and based on #432 , for discussing the actual implementation.
Replaced the Rest call used for the notification, with the websockets.

WebSocketHandler.open(self, *args, **kwargs)

def on_message(self, message):
print(u"Received: " + message)
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 know i know, just for debugging currently

@p0psicles p0psicles added this to the 0.1.1 milestone May 19, 2016
@p0psicles
Copy link
Contributor Author

@pymedusa/developers As we've decided that removing the messages requests is high prio, and scheduled for the 0.1.1 milestone, i'd like everyone to start looking at the implementation, and give feedback. Any is welcome.

@p0psicles p0psicles modified the milestones: 0.1.2, 0.1.1 May 24, 2016
@p0psicles p0psicles modified the milestones: 0.1.3, 0.1.2 Jun 11, 2016
@fernandog fernandog modified the milestones: 0.1.3, 0.1.4 Jul 31, 2016
@fernandog fernandog removed this from the 0.1.4 milestone Aug 16, 2016
@ratoaq2 ratoaq2 changed the base branch from apiv2-wip to develop September 17, 2016 13:20
@ratoaq2 ratoaq2 force-pushed the apiv2-websockets branch 2 times, most recently from 212ab3a to 53888cd Compare September 22, 2016 04:52
@OmgImAlexis
Copy link
Collaborator

@p0psicles are you able to fix this PR to have only the WS stuff and remove all the extra apiv2 commit, etc.
It also needs to be rebased on the remove-ek and the move to static PRs which should both be in develop in a day or two.

@p0psicles
Copy link
Contributor Author

Yeah will be working on this next

@OmgImAlexis OmgImAlexis added this to the 0.1.7 milestone Oct 22, 2016
@fernandog fernandog modified the milestones: 0.1.7, 0.1.8 Oct 26, 2016
@fernandog fernandog force-pushed the apiv2-websockets branch 2 times, most recently from 0c9b23f to 85413f4 Compare March 7, 2017 12:52
var msg;
try {
msg = JSON.parse(evt.data);
} catch(e) {
} catch (err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@OmgImAlexis shouldn't we log.error(err); here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No and this isn't err this is e. err should return a new error object where as this is an exception object. There's not actually any errors as this is used to check if the string if a json encoded string or just a normal string.

If xo is giving an error just add this to the right of it.
// eslint-disable-line-only ADD_ERROR_NAME_HERE

Copy link
Collaborator

Choose a reason for hiding this comment

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

@fernandog Can you revert this line's change?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure

@OmgImAlexis
Copy link
Collaborator

@pymedusa/developers @pymedusa/administrators @pymedusa/contributors

Can you guys please try this so it can be merged as it's been open for almost a year now.

@OmgImAlexis OmgImAlexis added this to the 0.1.12 milestone Mar 10, 2017
p0psicles and others added 6 commits March 9, 2017 22:50
  static/js/ajax-notifications.js:31:28
  ✖  31:28  Unexpected space before function parentheses.                                                   space-before-function-paren
  ✖  35:11  Expected space(s) after "catch".                                                                keyword-spacing
  ✖  35:17  The catch parameter should be named err.                                                        unicorn/catch-error-name
  ✖  49:5   A function with a name starting with an uppercase letter should only be used as a constructor
@fernandog fernandog added the Needs testing Requires testing to make sure it's working as intended label Mar 10, 2017
fernandog
fernandog previously approved these changes Mar 10, 2017
@fernandog fernandog modified the milestones: 0.1.12, 0.1.13 Apr 13, 2017
@OmgImAlexis
Copy link
Collaborator

@p0psicles can we please merge this into dev soon?

@labrys labrys dismissed fernandog’s stale review May 13, 2017 20:41

New review required

@p0psicles p0psicles merged commit 88cfcd4 into develop May 25, 2017
@p0psicles p0psicles deleted the apiv2-websockets branch May 25, 2017 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Concluded Needs testing Requires testing to make sure it's working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants