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

Edge case where two POST requests are sent for one round. #1

Closed
Parkkeo1 opened this issue Jan 13, 2018 · 2 comments
Closed

Edge case where two POST requests are sent for one round. #1

Parkkeo1 opened this issue Jan 13, 2018 · 2 comments
Assignees

Comments

@Parkkeo1
Copy link
Owner

Parkkeo1 commented Jan 13, 2018

Two entries within one second of each other. Edge case where I died to the last enemy but was instantly traded, ending the round. Since my death animation had not completed yet, I was not spectating and thus the player ID was me instead of the teammate who traded me.

1515799616 de_cache live dumby CT 2.0 0.0 4.0 0.0 4.0 4550.0 2.0 1.0
1515799617 de_cache live dumby CT 2.0 1.0 4.0 1.0 5.0 4550.0 2.0 1.0

The edge case caused the error in pistol stats. Also, will adjust threshold value to be more lenient ($200 + $800 = total highest possible equip. value for pistol round)

SQL data for game: player_data.txt

@Parkkeo1 Parkkeo1 self-assigned this Jan 13, 2018
@Parkkeo1 Parkkeo1 changed the title Not recognizing pistol rounds when equip. value is >850. Edge case where two POST requests are sent for one round. Jan 13, 2018
@Parkkeo1
Copy link
Owner Author

Parkkeo1 commented Jan 13, 2018

Temporary fix for this issue has been pushed to master. GSHandler now checks (if not endgame payload) if the difference in time between the last entry and current to-be entry is greater than 1 second. If so, entry is inserted into the table.

I've also thought of a slower, but safer fix using a manual for loop through the df to pick out individual indices remove AFTER the edge case entries have been added. Being tested in database.py.

@Parkkeo1
Copy link
Owner Author

Successfully tested the remove last/replace with new method by using manual POST request with python-requests.

test.json added to manually test GSHandler edge case fix

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

No branches or pull requests

1 participant