A plugin might have a lot of data to gather during a call to its read_userdata method. With database writing in the mix, delete_userdata and especially anonymize_userdata could take even longer than that. For example, in the case where a user has hundreds of comments on a site.
PHP has a default timeout of 60 seconds, and long pauses without progress are not the best UX. Some API clients might demand responses faster than 60 seconds even.
Let's come with a pattern that allows plugins to process userdata in batches and advise callers of progress/completion.
A plugin might have a lot of data to gather during a call to its
read_userdatamethod. With database writing in the mix,delete_userdataand especiallyanonymize_userdatacould take even longer than that. For example, in the case where a user has hundreds of comments on a site.PHP has a default timeout of 60 seconds, and long pauses without progress are not the best UX. Some API clients might demand responses faster than 60 seconds even.
Let's come with a pattern that allows plugins to process userdata in batches and advise callers of progress/completion.