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

Stop query if user Id & api not set. Slowed down no chat windows notifications #39

Merged
merged 20 commits into from
Apr 26, 2019

Conversation

cTheDragons
Copy link
Contributor

Fix for Issue #38

  • Do not start querying if UserId and API token are not set (ie are each 36 length long)
  • Stop checking for notifications if chat is not active, user ids not set and if chat windows are open
  • Increase notifications requery to 40 seconds * by factor greater than hour.

@cTheDragons
Copy link
Contributor Author

Have asked @Alys in the guild on the best method of testing this.

@cTheDragons
Copy link
Contributor Author

Thanks for your patience with the multiple commits. I forgot to update the firefox zip and only realised when getting ready for bed. Should be done now till the testers have completed testing.

README.md Outdated Show resolved Hide resolved
2.1.1 was taken on server release.
(Look at me I remember the zip file this time too)
@cTheDragons
Copy link
Contributor Author

Done. Updated the mainfest, zip and Readme

@cTheDragons
Copy link
Contributor Author

Just a little update, I have been running some testing on the refresh rates on chat and have found if you extend the chat greater than 60 minutes it is still querying every 5 seconds if you just leave your computer open and the chat focused. I think I will need to adjust this.

@Alys et all, could you confirm are you happy with the refresh rates for timeouts less than 60 minutes?

  • 5 seconds if the chat windows is focus (RefreshRateFast)
  • 45 seconds if the chat window is minmised (RefreshRateMedium) I think
  • 60 seconds if the chat window not focused (RefreshRateSlow)
  • 40 seconds if there is no chat windows.

I am planning to change the code if the timeout is greater than 60 minutes that it will proportionally increase the timeouts. Ie if you change the timeout to 120 minutes the RefreshRateFast will be every 10 seconds.

@paglias
Copy link
Contributor

paglias commented Mar 12, 2019 via email

@cTheDragons
Copy link
Contributor Author

Really?

It has been like this for a long time. I think since the beginning...

Should there be some API limiting if 5s calls are too much.

@paglias
Copy link
Contributor

paglias commented Mar 12, 2019 via email

@cTheDragons
Copy link
Contributor Author

Will do. How do you fetch notifications?

The API Doc only has posts options

@paglias
Copy link
Contributor

paglias commented Mar 12, 2019 via email

@cTheDragons
Copy link
Contributor Author

Is there are nice route other than user that will allow me to read notifications other than user?

@paglias
Copy link
Contributor

paglias commented Mar 12, 2019 via email

+ Slow down refresh rate to 30s as requested
+ Better poll checking if userID and token is 36 characters but still wrong
+ Fixing minor issues with firefox. (chat_inPage.js is the same as chrome)
Yes I forgot again.
@cTheDragons
Copy link
Contributor Author

All done. (Including the readme file)

  • Have set the refresh rate to 30s
  • Querying only achievements now instead of the entire user.
    and other bits and bobs I found scrambling through the code.

Will submit it back to the guild for testing.

@Alys
Copy link

Alys commented Mar 12, 2019

@paglias there's a group of up to 15 socialites and mods who are available to test this. Is it okay if testing happens now or do you want to set up any monitoring in advance, or wait for anything else?

@paglias
Copy link
Contributor

paglias commented Mar 13, 2019 via email

@cTheDragons
Copy link
Contributor Author

This can be released.

Confirmed by the following users:

  • @citrusella on Firefox
  • @LtCabel on Chrome
  • @ravenlune on Chrome

Let me know if you require anything else.

Thanks

@paglias
Copy link
Contributor

paglias commented Mar 21, 2019

thanks @cTheDragons ! There's just one thing we'd like you to add before this can be released: when making calls to the API, could you pass another header (alongside the x-api-user and x-api-key) to make it easier to identify requests coming from the chat extension? Something like x-api-source with a value of chat-extension should work

@paglias
Copy link
Contributor

paglias commented Mar 21, 2019

Actually regarding the header name, let's use x-client

Benjamin and others added 7 commits March 23, 2019 11:08
Fix internal error with party notificaiton.
Update Readmefile with changes.
* Modify date option to include short date
* Minor wording change
* Updated version
Fix indentation of display names when avatars are disabled
@cTheDragons
Copy link
Contributor Author

Changes completed. Just waiting on testing to occur with Socialites.

@cTheDragons
Copy link
Contributor Author

Found some issues. These have been corrected. Retesting with 2.2.1.

@cTheDragons
Copy link
Contributor Author

Version 2.2.1 ready to release.

This solves issue #38.

Confirmation from

  • @LtCabel (Tier 7 Socialite, Artisan) Chrome Version 73.0.3683.103 (Official Build) (64-bit), Windows 10 Tier 7 Socialite, Artisan
  • @weeWitch (Tier 7 Linguist, Socialite, Artisan) Testing on Firefox Quantum 66.0.3 (64-bit) on a Windows 7 environment.
  • @aspiring_advocate (Tier 5 Artisan, Linguist, Socialite) Testing Chrome, Version 73.0.3683.103 on a Mac?
  • @aspiring_advocate (Tier 5 Artisan, Linguist, Socialite) Testing Firefox, Version Unknown on a Mac
  • @ceran (Tier 4 Challenger, Socialite) Testing on Chrome, Version 73.0.3683.86, on a windows 7 laptop.

It should be noted that both with @aspiring_advocate on Firefox and @ceran on Chrome both encountered issues

  • Linking the API Key and Token cause the page to reload several times
  • Group List failed to load.

However in both these cases it is believe this was due to server issues at the time, as further tests this did not occurred. (The system no longer re-queries if it cannot load the group list which explains this behaviour).

@paglias
Copy link
Contributor

paglias commented Apr 26, 2019

Thanks @cTheDragons ! Will briefly test locally and release

@paglias paglias merged commit 2918da5 into HabitRPG:master Apr 26, 2019
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.

None yet

3 participants