Closed ricky-crichq closed 4 years ago
Good find! Would love some help and/or a PR if you have the time. I guess one thing could be, as you say, to avoid creating the file on every boot.
Yeap, no problem, we will make some changes to not rewrite the file if it just read from the cache.
Will be also solved by #35
Solved by #35 as the whole cache is not needed anymore. Please see the Migration Guide for more information.
When using this Gem we started seeing
EOFError: end of file reached
.We are pretty sure this is caused by multiple threads trying to save/load the PlayStore Discovery Repository at the same time.
This can be replicated pretty easily:
Not really sure how best to proceed here but one way to improve this would be to not rewrite the cached file on every boot. Unless there is something I am missing here?
https://github.com/jnbt/candy_check/blob/master/lib/candy_check/play_store/client.rb#L92
Happy to put in the work to improve this with some guidance on the best way to proceed.