Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2020 at 21:21 UTC
Updated:
4 Sep 2026 at 07:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
laurentb commentedComment #3
berdirdo we really need an immediate option, we could just check for the setting being > 0? who knows if 0 could result in some weird race conditions?
Tests would be nice but could be a bit tricky, but we could manually set the changed date back in the database and then run cron, making sure it first doesn't get deleted and then it does.
Comment #4
huzookaComment #6
huzookaComment #7
huzookaNumber of items purged during one cron run can be also configurable.
Comment #8
huzookaComment #9
huzookaComment #10
huzookaAfter some testing in our project, I noticed that the cleanup performance varies a lot (we're using entity operations).
Deleting 5000 items sometimes needs 70 second (a bit more than 1 minute), in other cases it takes 677 sec (more than 11 minute).
I'm gonna create a queue worker, and queue the configured number of approved items; then wait until the queue is fully processed. With this approach, we can have some control on the processing time, and also, we can continue processing outside of cron, e.g. with Drush or by using Queue UI. Also, since queue workers are plugins, this approach will allow to modify the initial processing time.
Comment #11
huzookaComment #12
alorencComment #13
alorencComment #15
dimilias commentedI have resolved the conflict and seems to be green :) I tested it and it works as expected so RTBC +1.
Comment #16
claudiu.cristeaLooks good. The only thing that I can think of, is whether we want a different threshold for the aborted job items. But that seems to be easy to implement afterwards if needed, the update path would be trivial.
Comment #17
claudiu.cristeaI've added a CR https://www.drupal.org/node/3618429
Comment #19
claudiu.cristeaMerged and published the change notice. Thank you