Currently, Reddit posts are created when the bot queries Reddit, to check if the post has already been published. This is error prone, because Reddit rate limits cause a lot of cache misses, and empty responses. Thus, the bot ends up creating duplicate posts.
We need to save published submission state locally.
This was addressed previously. I implemented TinyDB, which keeps a small JSON file saved on-disk. We sync with that file now, rather than relying on Reddit APIs for cache resolution.
Currently, Reddit posts are created when the bot queries Reddit, to check if the post has already been published. This is error prone, because Reddit rate limits cause a lot of cache misses, and empty responses. Thus, the bot ends up creating duplicate posts.
We need to save published submission state locally.