locale_translation queue loop

Created on 27 January 2020, over 5 years ago
Updated 30 January 2023, over 2 years ago

Problem/Motivation

Our locale_translation queue sometimes gets stuck in a loop because it contains locale_translation_batch_fetch_import batch jobs for translation projects that are already imported.

For example, we will have a row that looks like this in the queue table:

|  196933 | locale_translation | a:2:{i:0;s:37:"locale_translation_batch_fetch_import";i:1;a:4:{i:0;s:7:"metatag"...

Although this locale was already imported.

Because of this, the locale_translation_get_status() call at the beginning of locale_translation_batch_fetch_import() results in a current type source for this particular project.

locale_translation_batch_fetch_import() then checks if the source type is remote or local before doing anything. In our case, the source is current so the batch is never completed and it will keep recreating the same queue item forever.

Proposed resolution

I could not identify what creates these batch jobs, but the attached patch fixes the loop by ending the batch without doing anything when the source type is current.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
Language systemΒ  β†’

Last updated 3 days ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡«πŸ‡·France prudloff Lille

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024