Allow translation via a cron queue worker

Created on 13 July 2023, over 1 year ago
Updated 8 November 2023, about 1 year ago

Currently, all translations are performed using the Batch API, which doesn't allow for the use of the module to be used with translation via Cron runs.

To reproduce this, set up a continuous worker and then set translations to be run via Cron instead of on save, via the settings. When the cron runs, all items will be stuck in In Progress and the job will become stuck in the batch table.

The following patch was quickly put together to detect if the `requestJobItemsTranslation()` method is being called via `tmgmt_cron`, if it is, then the job is queued via a Cron Queue worker process.

When the Cron Queue worker process runs, it simply bundles up the original request items and hands them off to the batch methods to perform the translations, as if being run via the Batch API.

Some testing has been performed with success so far.

Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

🇦🇪United Arab Emirates leslie.cordell Dubai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024