Page MenuHomePhabricator

Automatically update Add Link tasks when community configuration is changed
Open, Needs TriagePublic

Description

Some of the features of Add a link tasks can be changed via community configuration, and some of these changes are applied when the task is generated. Once the task is stored in the task pool, it is not possible to change it. This makes it confusing to use community configuration, as there's no way to tell the configuration of the actual tasks in the pool.

We should probably automatically update the tasks when the configuration is changed. A few things to consider:

  • It should be easy to make a list of which configuration settings only affect task generation, and only launch the (slow and resource-intensive) update process if one of those settings are changed.
  • There should be a limit of how often updates are run (something like 1/day). Ideally, if the limit is hit, further configuration changes would still result in updates, just delayed.
  • Tasks which have been generated after the configuration change do not need to be updated (this can be done by comparing the edit timestamp and the task generation timestamp).

The maintenance script revalidateLinkRecommendations.php already has the required logic; we should either convert it to a job, or make it run regularly in "autodetect" mode where it can somehow tell if the wiki's configuration changed recently and skip it if it didn't.