Page MenuHomePhabricator

When the bot is set to disabled for a wiki, pause all jobs on that wiki
Open, Needs TriagePublic

Description

Currently, when the bot status is set to disabled, only the regular bot operation stops. All running jobs continue until they are completed. Jobs cannot be stopped by non-admin users, while the regular bot run can.

When the bot is stopped because there is a bug or a configuration issue, it is desirable that all bot edits are paused. It should be possible to resume jobs, trigger new jobs, and run the bot on single pages both for testing purposes and to allow operation on wikis when/where there is no regular bot operation.

Event Timeline

Cirdan created this task.Sep 1 2018, 6:51 AM
Restricted Application assigned this task to Cyberpower678. · View Herald TranscriptSep 1 2018, 6:51 AM

Pausing the workers blocks other wikis as a result.

There's a reason why job queues are still accessible even if the bot is disabled. It allows for controlled tests.

Cirdan added a comment.Sep 5 2018, 3:58 PM

I know. I'm not asking to cancel jobs or to prevent jobs from being (re)started, I'm just asking to suspend the jobs as one can do here.

As just happened on dewiki, the bot was stopped by a user due to a bug but my (quite long) jobs continued to be worked on, resulting in several more hours of edits. As far as I know, users cannot suspend jobs started by others, also it is really difficult to figure out which jobs are active without access to the job queue, especially as long as the link suggested in T203301 is not added to the edit summary.

The point is that, when a job is suspended, it blocks the worker. In other words, the worker goes to sleep. Which means if you suspended 5 active jobs, the queue will become inactive.

Cirdan added a comment.Sep 5 2018, 4:04 PM

OK, thanks for explaining. Can't the jobs be put to the end of the queue then at least? Or is that not possible either?

OK, thanks for explaining. Can't the jobs be put to the end of the queue then at least? Or is that not possible either?

Jobs are sorted by their IDs. So they can't really be moved.

Best I can do for now is to prevent the submission of new jobs and let the current jobs run to completion.