ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[eFEAT] Data about new league #247

Closed akasolace closed 4 years ago

akasolace commented 5 years ago

See lot of users using an old tool that predict league for next season based on ranking. Maybe we could have this somehow in HO and/or maybe simply in a static webpage

@tychobrailleur I keep here for reference a list of implemented endpoint:

[GET]

[POST]

w/ json like {"username": "john Doe", "data": [{"teamId": 73868, "Score": 970050050000000}, {"teamId": 280009, "Score": 960050050000000}, .....

tychobrailleur commented 4 years ago

There seems to be various timeouts in the logs:

 [Error]   HttpDataSubmitter: Timestamp: 1584957999587
 [Error]   HttpDataSubmitter: Error submitting data to HO Server: {"HTTP Status Code": 520, "Msg": "Request could not be processed", "error_desc": "'Another transaction has changed this data; aborting'", "json": {"leagueId": 5, "season": 74, "username": "capitaineFro", "data": [{"teamId": 1750670, "Score": 571852953300000}, . . .
 [Info]    LeaguePromotionHandler: Status of league: 5 : {"status_code": 1, "status_desc": "NOT_AVAILABLE", "nbBlocks": 14, "nbBlocksReady": 3, "nbBlocksInProgress": 0}
 [Info]    HttpDataSubmitter: Lock block for league 5...
 [Error]   HttpDataSubmitter: Read timed out

I am not too sure how come it looks like some of the blocks are being processed in parallel in your logs: they should be processed sequentially, to avoid putting too much load on both HT and HO servers.

I am going to run tests using league 5 rather than 21 to see if I can reproduce.

tychobrailleur commented 4 years ago

I am seeing similar issues as I am testing this this evening, pushes of blocks seems to timeout:

Screenshot 2020-03-26 at 18 32 06

Not sure what is going on on the server, but there seems to be an issue there.

However, this situation also needs to be handled on the client side, and I see two options here:

I am tempted to go with option 2 for now (exponential backoff), and stop after 4 or 5 attempts. Thoughts?

akasolace commented 4 years ago

closed by 42687e3 and d014420