Add new feature to purge continuous jobs item
| Comment | File | Size | Author |
|---|
Issue fork tmgmt-3134985
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
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