HomePhabricator

Record background runs of batches
9b343b5f0cf8Unpublished

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

Record background runs of batches

Two buttons are added to a batch page: autoconfirmed users can start a
background run for their own batches, which results in that run being
recorded in the database including the user’s OAuth credentials, and the
submitting user or any administrator on the target wiki can stop a
background run again, which removes the OAuth credentials from the
database. Additionally, background runs stop as soon as a batch closes
due to its last command being run.

No actual background running takes place yet – a separate program that
uses this information and runs in parallel to the web server will be
added soon.

The buttons are currently always shown on the batch page, and there’s
not yet any way to see whether a batch is running in the background or
not, or its history of when it was running in the background in the
past. That will also be added later.

The InMemomryStore implementation is not tested yet, since, without
methods to access the background information (see above), it might as
well be a no-op. I’ll hopefully add tests once there is a way to access
the list of background runs. (For the DatabaseStore, I think it’s more
acceptable to test what the implementation does at the database level.)

Details

Provenance
LucasWerkmeisterAuthored on Mar 31 2019, 1:03 PM
Parents
R2494:51fe717ee7e2: Always call _now() at the beginning of a method
Branches
Unknown
Tags
Unknown
ChangeId
None