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

3.0: Interface for background tasks queue #7995

Open
jdarwood007 opened this issue Jan 1, 2024 · 4 comments
Open

3.0: Interface for background tasks queue #7995

jdarwood007 opened this issue Jan 1, 2024 · 4 comments

Comments

@jdarwood007
Copy link
Member

We need an interface to the background queue.

It should let us:

  • view the queue
  • See the type of task to be performed
  • See the age of the task
  • Remove the task
  • Send the queue

Viewing the queue can help determine backlogs in processing.
Corrupted or broken queue items will not be removed from the queue. Allowing the admin a simple way to manage these would help.
Sending can help if the admin wants to push it should a high number of items be in the queue.

This is essentially a clone of the mail queue but for background tasks.

@Sesquipedalian Would this be able to make 3.0? Titled it for 3.0, but will leave the milestone up to you.

@jdarwood007 jdarwood007 changed the title 3.0: Interface for background queue 3.0: Interface for background tasks queue Jan 1, 2024
@Tyrsson
Copy link
Collaborator

Tyrsson commented Jan 1, 2024

So basically we need a backlog UI that allows marking task in another queue that fast track them ahead of the currently scheduled items? Or maybe I'm missing something..

@jdarwood007
Copy link
Member Author

The Send Mail queue function essentially forces the mail queue to send by ignoring limits and other protections (except for timeout handling). So it would act the same. Say there are 5000 items in the queue, instead of slowly pushing out a few items at a time (let's say 60 items a minute), it would take almost 90 minutes to send all of it, it would just tell it to send it all now. Server performance may be impacted (just as sending the mail queue can do).

Seeing the queue and knowing how much is backlogged, can help admins know that adjustments need to be made to keep up with the queue.

@Sesquipedalian
Copy link
Member

It's a good idea, although it might need some refining. Specifically, trying to create an ability to flush the queue might not make a lot of sense. As I recall, TaskRunner already tries to complete as many tasks as it can in a single run before timing out. Trying to flush the queue wouldn't do anything more than the system already does.

We may also need some new database columns to count execution attempts and such.

@Sesquipedalian Sesquipedalian added this to the 3.0 Alpha 5 milestone Jan 2, 2024
@jdarwood007
Copy link
Member Author

Well, we need that for the mail stuff as well, so we can dump mail that isn't sending. The hack I worked into 2.1 was to work around database columns by abusing the priority column.

There is some logic though that prevents us from sending too much. Even if something is in the queue, hitting cron.php won't send it, if it just did a little while ago, at least from my basic testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants