Problem/Motivation

When fields are deleted, the content is deleted via field_purge_batch() called from system's cron hook. This means that it's always necessary to wait for a cron run to occur before the field is fully deleted, even if there's only a couple of rows.

Steps to reproduce

Proposed resolution

Based on #1189464: Add an 'instant' queue runner add a field purge queue runner, and when fields are deleted from the UI, add the field to the instant queue runner. If there are only a few rows to delete, this will allow the entire field deletion process to finish without waiting for a cron run.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

catch created an issue.

nicxvan’s picture

It would be interesting to also find a way to maybe queue a couple every few requests so you don't have to wait for cron.

catch’s picture

We could probably do something like that with $_SESSION and a request listener - add something to session when the field is deleted, in the request listener, if there's a key in session, add a couple of queues to the instant queue runner. Main thing would be cleaning up the session key after a certain amount of time or when there's nothing else to do.