RSS-to-Telegram-Bot icon indicating copy to clipboard operation
RSS-to-Telegram-Bot copied to clipboard

Posts are not in the correct order

Open sepehrbrj opened this issue 1 year ago • 3 comments

Describe the bug Posts are not in the correct order as in the source feed.

Screenshots

Feed posts: Screenshot_20220907-150047_1

Bot posts: Screenshot_20220907-145940_1

sepehrbrj avatar Sep 07 '22 18:09 sepehrbrj

This is not a bug. Given that the bot is asynchronous and performance-optimized, each new post within each updated feed creates a "task", then all tasks are handled asynchronously (or, to make it easier, concurrently). Asynchronous means that the order of tasks to finish is uncertain. Also, all tasks are context-free, so they themselves can never know whether other ones are finished or not.

Rongronggg9 avatar Sep 08 '22 01:09 Rongronggg9

At first, I also thought this issue was inevitable, but some other bots don't have this issue.

I don't know about the RSStT bot function and just reported the issue. If this issue is fixed, it'd great. If not, no problem.

sepehrbrj avatar Sep 08 '22 06:09 sepehrbrj

I will have this issue kept open. If someday the "sending post" tasks are contextual, it is possible to send posts in order. But before that, #122 needs to be implemented.

Rongronggg9 avatar Sep 08 '22 09:09 Rongronggg9