Page MenuHomePhabricator

Schedule Job when parser is called from another job
Closed, ResolvedPublic3 Estimated Story Points

Description

Schedule the TTS engine call as a job if the parser function is being called from another job ($wgCommandLineMode = true) or if expensive parser function limit was reached. In T315483 we decided not to render the button if the expensive parser function limit was hit but that should not be a problem now because we run the expensive bit as a job if that happens

Follow up to T318086: Create phonos Jobs to handle mass file generation

Acceptance Criteria

  • The button should always be rendered and the url to the file should always be present. If the audio file is not ready, an error message should be displayed on click.
  • If the phonos parser function is called from a cli command (Ex. another job) and the file does not exist or if expensive parser function limit was reached, it should fire up the phonosIPAFilePersist job instead of generating the file synchronously

Event Timeline

dmaza renamed this task from Queue Job when parser is called from another job to Schedule Job when parser is called from another job.Sep 29 2022, 8:29 PM

Change 838261 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/Phonos@master] Generate audio file in a job if phonos is called from a cli command

https://gerrit.wikimedia.org/r/838261

dmaza set the point value for this task to 3.Oct 5 2022, 2:42 PM
TheresNoTime subscribed.

Just surfacing the non-blocking question I asked on the patch β€” should we have a unit test for the job creation?

Change 838261 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Create a Job when phonos tag is rendered from another job

https://gerrit.wikimedia.org/r/838261

Yes we should. I’ll submit a follow-up patch

Change 841131 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/Phonos@master] Add missing unit test covering Phonos class

https://gerrit.wikimedia.org/r/841131

Change 841131 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Add missing unit test covering Phonos class

https://gerrit.wikimedia.org/r/841131