Same Job processed/checkout twice by the JobCheckoutManager

Created on 15 February 2021, almost 4 years ago
Updated 11 October 2024, 3 months ago

Problem/Motivation

In a specific (but common) use case my Job is processed twice by the JobCheckoutManager and sent twice to the Translator service.

Steps to reproduce

I have got ONLY 1 Translator provider (XTM in my use case, set up their official Tmgmt XTM module connector).
In settings (/admin/tmgmt/settings) the "Allow quick checkout" is checked;
In a Content translation UI I check 1 (or more) language and then click on the "Request Translation" to trigger the translation request process (with quick checkout);
Every language job will be sent twice to the Translation Provider, though created only one Job for its instance (@see the attached screenshot);

From some debugging I can see that this is happening (with the above setup/conditions) because in the JobCheckoutManager->checkoutAndRedirect the same Job will be managed and submitted for translation both in the JobCheckoutManager->checkoutMultiple method and, throughout the batch_set($batch) in the batchSubmit static method ...

API changes

Should this be avoided with a functional logic that impeded duplicated Jobs being sent to the Translator provider?

🐛 Bug report
Status

Needs work

Version

1.0

Component

Core

Created by

🇮🇹Italy itamair

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.

  • First commit to issue fork.
  • Pipeline finished with Failed
    3 months ago
    Total: 312s
    #307028
  • 🇬🇧United Kingdom scott_euser

    Unfortunately while the patch still solves it (now converted to MR), the module has moved on and the tests don't work like that any more it seems. No messages are no returned (rather than 4, or 2 with the patch).

  • Pipeline finished with Failed
    3 months ago
    Total: 442s
    #309718
  • Pipeline finished with Failed
    about 1 month ago
    Total: 718s
    #359911
  • Pipeline finished with Success
    about 1 month ago
    Total: 670s
    #359918
Production build 0.71.5 2024