alleyinteractive / wp-bulk-task

A library to assist with running performant bulk tasks against WordPress database objects.
GNU General Public License v2.0
15 stars 0 forks source link

Allow setting the total number of items in the progress bar #38

Open mboynes opened 2 months ago

mboynes commented 2 months ago

Description

Provide the implementing developer a way to set the total number of items in the progress bar. As of now, it is set to the max id, which isn't necessarily the number of items being processed.

Use Case

In my use case, I'm only processing about a tenth of the database, so after I create the Bulk_Task object, I'm setting the cursor to the value (1 less than that which) I want to start at. When I start the command, the progress bar is 90% progressed, because my start ID is roughly 90% of the max id.

Implementation ideas:

renatonascalves commented 2 months ago

I think #14 is related.