Skip to content

Fix store id for queue job #1769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pikulsky
Copy link
Contributor

Summary
The “algoliasearch_queue” table keeps job entries. Job's "data" field is a JSON string with job details.
Starting from 3.6.0 the field names in "data" JSON got a new format: from snake case they were changed to camel case:

How job was added to the table before version 3.6.0: field names with snake case:

['store_id' => $storeId, 'product_ids' => $chunk],

  $this->queue->addToQueue(
      Data::class,
      'rebuildStoreProductIndex',
      ['store_id' => $storeId, 'product_ids' => $chunk],
      count($chunk)
  );

in 3.6.0 the format was changed to camel case:

['storeId' => $storeId, 'productIds' => $chunk],

  $this->queue->addToQueue(
      Data::class,
      'rebuildStoreProductIndex',
      ['storeId' => $storeId, 'productIds' => $chunk],
      count($chunk)
  );

But there are two places where code works with the old snake case format:

  • while loading a job record and decoding "data" values
  • while sorting jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant