Open
Conversation
Write a position weight updater that fetches data from a.llsif.win/live/json.
Continuing even when error is encountered
Add 0.5 factor for swing notes
Rewriting most of the multiprocessing part of the weight updater, adding introduction title and other info logs to it
liaocm
approved these changes
Oct 8, 2017
Collaborator
liaocm
left a comment
There was a problem hiding this comment.
In general LGTM, but please consider the comments before merging.
-liaocm
|
|
||
| def getLiveMap(liveId): | ||
| liveJsonUrl = getLiveMapJsonUrl(liveId) | ||
| liveJsonFp = urllib2.urlopen(liveJsonUrl) |
Collaborator
There was a problem hiding this comment.
Make sure the request header contains good UA, Accept, Accept-Language, and Accept-Encoding field. Otherwise this may be flaky (happened to my auto upgrade script.)
Also, consider using gzip encoding here as it would dramatically reduce load latency. Using 'gzip' library will easily decode the response.
| prevLoadedLives = [] | ||
| updatedLives = [] | ||
|
|
||
| messageQueue = multiprocessing.Queue() |
Collaborator
There was a problem hiding this comment.
Do we really want to multi-process the fetching process? Every update contains only a few new maps and multithreaded code is super hard to read and maintain.
chazeon
referenced
this pull request
in chazeon/LLHelper
Apr 22, 2018
Refactor attribute strength calculation in llnewunit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use maps from a.llsif.win/live/json/ to avoid using of the unmaintainable old and problematic weight updater.