bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.24k stars 263 forks source link

Split Celery queues into more functional categories #2907

Closed WesleyAC closed 1 year ago

WesleyAC commented 1 year ago

Currently, we have five celery queues: Low priority, Medium priority, High priority, Imports, and Broadcasts. I propose (as described in https://github.com/bookwyrm-social/bookwyrm/issues/2874#issuecomment-1643027240), splitting these up into more functionality-related categories (seeing as the different "priority" queues are not actually prioritized differently):

In general, switching from the current queue "priority" system to a more functionality-based system would I think probably be preferable. The current status quo is that everything in the "high-priority" queue will be behind by the same amount of wall-clock time, which makes everything in it equally slow, when it might be better to have some particular tasks fall behind, while other (less common or compute intensive) tasks are operating in real time.

In particular, I propose starting with the following queues:

There are also some cases where different tasks should be in different queues depending on other circumstances, such as add_status_task probably wanting to go in a import-related queue for backdated statuses (currently it goes in the low priority queue in that case)

We will need to keep around the existing queues for a release in addition to the new queues, so that we can upgrade without dropping any tasks.

mouse-reeve commented 1 year ago

I think this is a good idea! I also think we could simply not add imported reviews to the activity streams.