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

Couldn't get information about problems with the contest in progress #4

Open
Thunder8110 opened this issue Oct 14, 2024 · 3 comments
Open
Labels
bug Something isn't working todo To be implemented

Comments

@Thunder8110
Copy link
Owner

コンテスト中または直後にそのコンテストの問題の情報が取得できない(Problemsに情報が反映されていないので)
さらに新問題がProblemsに登録される前に既存の問題を解くと最後に取得に成功した時間が上書きされてしまい取得が不可能になってしまう
いつかはちゃんと解決しなきゃいけない(現状動かないわけではないが)

@Thunder8110 Thunder8110 added bug Something isn't working todo To be implemented labels Oct 14, 2024
@kemuniku
Copy link
Contributor

problemsのjsonを取りに行くタイミングで、ある程度余裕を持って提出を取りに行くとかになりそう(精進鯖はそんな感じでした)
一回のAPIで500件取れるはずなので、一週間くらい余裕を持っておけば週500subとかする精進化け物じゃない限りほぼ影響ないはず...?

@Thunder8110
Copy link
Owner Author

余裕をとる、なるほどです
週500提出は超頑張ればできるので(無意味な提出をしまくるという意味ではなく)、この際解決してしまいたいです
具体的には、取得開始時刻を持っておき、取得時には新しいデータが取れなくなるまでリクエストする流れになりそうです

が、取得リクエストを2回以上投げるのは負荷的にどうなんだという話もあります

@kemuniku
Copy link
Contributor

https://github.com/kemuniku/Shojin-Point
では、APIをとって取得数が500じゃなくなるまで時間更新していくみたいな実装に変更しています

problemsの更新が走ったときのみ余裕をもって取得するという感じでいいかもしれません(定期的に取得しているAPI負荷を考えたら、ボタンを押したときにAPIリクエストが2,3回増えても誤差そうです)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo To be implemented
Projects
None yet
Development

No branches or pull requests

2 participants