DBFlow icon indicating copy to clipboard operation
DBFlow copied to clipboard

Progress of transactions using TransactionManager

Open arturonaredo opened this issue 11 years ago • 2 comments

Hi Andrew,

It would be really nice if somehow we could retrieve the amount of data/entities pending to be inserted, do you know how we could access to this info in order to create a progress bar/percent?

Cheers, Arturo.

arturonaredo avatar Mar 08 '15 23:03 arturonaredo

I would shy away from using the queue as a means for percentage as I would try combining transactions into ones that are as large as possible (for exponentially higher performance).

If you wish to do a percentage for a single transaction, you can subclass ProcessModelTransaction or any of the default subclasses of that such as SaveModelListTransaction and override processModel().

You can keep track of the number of models saved/total and provide an event listener for that yourself.

I hope this helps

agrosner avatar Mar 10 '15 14:03 agrosner

closing

agrosner avatar Mar 17 '15 00:03 agrosner