Cron won't insert new items to the queue list when a migration is not idle and last items to process belongs to it

Created on 7 March 2023, about 2 years ago
Updated 17 April 2024, 12 months ago

When last queued items belongs to a migration that is not idle, those items keep being delayed, meaning that the queue will not be empty until the migration is idle, however, if for some reason the migration is not idle again because of any error might occur, a loop beings making impossible to queue new items until those last ones are clear or the migration error is addressed an solved, queue must be empty in order to add more to the list.

Proposed solution

First solution:

- Put the migration to its idle state and let the element process normally, capture any exception that might occur, retries should decrease.

Second solution:

- Every time a migration of certain item is detected to be not idle, decrease the retries count.
- If item has no retries left just remove it from the queue, either using the garbageCollection method (this might be tricky since retries are store in the data field) or just when the item is about to be processed.
- Don't queue items wich migration is not idle, to prevent items from being processed, notify through log that X item from X migration coulnd't be added because migration is not idle.

Third solution:

- Alter the condition to allow adding new items to the list even if the queue is not empty(items will remain stuck in the queue tho).

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain SadySierralta

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024