wp-background-processing icon indicating copy to clipboard operation
wp-background-processing copied to clipboard

When is a process complete?

Open datawench opened this issue 10 months ago • 1 comments

I gathered that the plugin maintains a queue of pushed items, on which it operates in task(), peeling off one at a time, so that when the queue is finally emptied, the complete() function finally fires.

That doesn't seem to happen for me? That is to say, there's no automatic completion. If I take the radical step of deleting the wp_options created by the process, it does finally execute complete(). Is that the expected operation? Or am I supposed to issue a cancel(), or delete items from the queue myself, or... ?

datawench avatar Mar 26 '25 19:03 datawench

Your task() function should return false after completing the task or it will keep on processing the same item over and over and not take it off the stack.

koen12344 avatar Apr 08 '25 12:04 koen12344

Thanks for answering this @koen12344. ❤️

ianmjones avatar Nov 03 '25 14:11 ianmjones